IDE for Firefox Add-ons Development - eclipse-plugin

I have been working on firefox add-ons for quite a long time and its been a real headache to use notpad++ for development. Is there any suitable IDE or plug-in for eclipse available.And just like we do **Run on Server" for dynamic web-projects,Is there any way that, I do a change in any of the sorce file and it automatically creates the .xpi file and installs in firefox?

There are a lot of editors or IDEs that could be easily integrated with the SDK to perform basic tasks like running cfx run or cfx xpi. Here's the system that I use:
I have Wladimir Palant's 'Extension Auto Installer' installed in Firefox
I have a script like this in the add-on's root directory:
#!/bin/bash
/path/to/cfx xpi && wget --post-file=filename.xpi http://127.0.0.1:8888/
Every time I want to test the add-on, I just run the script and the xpi is built and installed into Firefox. Most editors will have some capability to bind a shel command like this to a keybinding.

You don't really need IDE to create XPI every time you make a change.
Create a folder with your addon's source code (e.g.
C://addons/myaddon/).
Put a file containing this path to the folder
containing your Firefox addons and call it the same as your addon ID
(e.g. myaddon#domain.com).
In your install.rdf file, add this line: <em:unpack>true</em:unpack>
This way you can just restart the Firefox whenever you want to see the changes. I recommend this addon, it adds a keyboard shortcut Ctrl+Alt+R for quick restart of Firefox (be sure to get the 0.6b2 version, previous versions don't support the keyboard shortcut):
https://addons.mozilla.org/firefox/downloads/file/121516/restart_firefox-0.6b2-fx.xpi?src=dp-btn-devchannel
Also, you will not loose your source code in case you uninstall your addon while testing (this happens when you develop directly in your Firefox addons folder).
As of IDE, for me personally any editor with syntax highlight for XML and JS works just fine. My personal favorites are Aptana (Eclipse based IDE) and Intype (lightweight and extremely fast).

Related

Best way to share SikuliX scripts (and OS friendly)?

I have a Sikuli 2 script which is composed of:
an app.sikuli directory
with a app.py in it
and several Things.png images
Most of this structure was auto generated by SikuliX while I was creating the script. If I have to switch to another method of creating a Sikuli project, please say so, it's new to me.
I want to "share" this script to any other OS (say I wrote it on Linux, and I want to share it with MacOSX, Windows...). And I want this script to be straightforward to execute (the less steps, the less complexity), but I can modify anything before sharing.
I found the snippet from the Git Docs for Sikulix. Let me know if you found any other solutions because I only know of distributing the finished code for running the .exe on machines with the IDE or just Java installed (NOT TO EDIT -- UNLESS ANOTHER IDE IS BEING USED LIKE ECLIPSE WITH SELENIUM)
YT OF SELENIUM SIKULIX INTEGRATION https://www.youtube.com/watch?v=k65uCl42hSg&list=PL2EKpjm0bX4LqPht11MRfu9R1qUOSAZn3
https://sikulix.github.io/docs/scripts/running-scripts
Where and how can a SikuliX script be stored#
When you need to distribute your SikuliX scripts you have two options: zip-file and jar-file, both variants pack the SikuliX script content in one file, which makes distribution easier. Both can run with SikuliX.
The jar-file variant has an option to be packed together with the scripting and SikuliX feature support (self contained), so it might be run on systems only having a valid Java installation.
variant zip-file#
It can be created in the SikuliX IDE with the file menu entry “Export packed source” and gets the ending .skl instead of .sikuli. As such it cannot be reopened for editing nor used for import, it can only be run using SikuliX features on systems having a valid SikuliX setup. In fact it is simply a zip-file, which can be brought back to a .sikuli folder using a zip utility. So be aware, that this variant does not really hide your script content.
variant jar-file#
It can be created in the SikuliX IDE (file menu entry “Export as jar”). It can be run using SikuliX features on systems having a valid SikuliX setup. The script source is contained in compiled form (Java byte code) and hence not visible, even if one accesses the jar content. So this variant gives some level of secrecy for your scripted workflow.

How do I use sops as an External Tool in my IDE?

I'd like to use sops to edit files in my IDE (Intellij), but I'm not sure how best to set it up as an External Tool.
I found these related questions:
Use vscode as editor for sops
How to execute External Tool in IntelliJ
IntelliJ IDEA at least 2020.2 does now support --wait
https://www.jetbrains.com/help/idea/working-with-the-ide-features-from-command-line.html#arguments
I tried
export EDITOR="idea --wait"
sops secret.yaml
Unfortunately doesn't work even though in idea there is the message
Activated from command line: Command line will be waiting until the file '/Users/user/Development/../secret.yaml' has been closed.
IntelliJ IDEA has no support for --wait and cannot be used via the EDITOR environment.
See this issue and the linked duplicates.
External tool will not work. This can be supported by implementing IntelliJ IDEA plug-in that will integrate with the command line tool to transparently encrypt/decrypt the files you are editing.
As of 2020.3.2 i can confirm that setting environment EDITOR to
"C:\\Program Files\\JetBrains\\GoLand 2020.3.2\\bin\\goland.exe" --wait
and then using sops <file.enc.yaml> works fine for me (in windows). You need to press Ctrl-S each time you want changes to be saved since opened file treated as external for the project you working with.

How can installed packages of a Python project in Pycharm IDE be used in every new Projects

Hello from the other side,
Python file on pycharm
I pip installed some packages using pycharm terminal: mysql connector, pymysql, pillow, etc needed for my programmes.
I have created some Python files and imported mysql connector, pymysql, PIL, etc and my codes worked fine.
Recently I tried creating a new python file in a new project, when I tried to import mysql connector and pymysql, my codes get red underline, notifying me that the imported modules can't be found.
These are the same packages I imported in my previous files and they worked fine.
So why are they turning red underline and greyed out now?
Do I need to be pip installing these packages for every new project?
I tried to see how I could resolve this by making some researches and asking some friends. I was advised to go to the settings and try to create a new environment with the installed packages of my choice, and then checking the boxes for global inheritance and making it available for other projects.
After this, the OK button was inactive (greyed), so I couldnt apply this change. I discovered I was notified that the enviroment rowbox wasnt empty and that I should use a new virtual environment which is empty but I really don't know how to create this.
Please if you've encountered something like this before or can assist, kindly give me a step-by-step approach.
Open File -> Settings
Select Project Interpreter than go to the gear wheel in the upper right corner and select add.
Use Virtual Environment, select your prefered base Interpreter in my case 3.6 and add the name for the virtual environment and where you want to store it
If you don't need to I would suggest to not inherit global site packages
But you should select make it available to other projects.
Confirm it.
Afterwards the virtual env should be selected in project interpreter if not select it from the list. Right beside the List you see a plus, you can use this to add new packages with python (doesn't work all the time for me -> then use terminal)
I really thank everyone who made effort to attempt my question. After much trial, I was able to resolve it and I will post how I resolved it step-by-step to enable others like me understand better.
First, when installing our Pycharm, a folder is automatically created for storing every project we shall be working on, this folder becomes the database of our projects. In most cases, folder is stored in our C:\drive.
Now, open your pycharm window (I mean your working template),
File ----> open (this diplays the folders in your drive) ----> select the folder for storing your Pycharm projects and click ok. NOTE: do not open this folder to show your projects, just click on it and click ok. There are some situations whereby the Pycharm projects folder is already displayed on our pycharm window, this is because we already chose it during our installation. In a case like this, no need trying to bring it to the Projects displayed in our window as it'd already be displayed in the Projects in our window.
Your Pycharm projects folder will then display in your pycharm window under Projects.
Click on the Pycharm projects folder under your Projects and it will be highlighted blue.
Go to settings ----> Project: (your pycharm projects folder will also show here)
By the right, select Project interpreter.
Do your normal installation of packages by clicking on the + sign at the right extreme (that is if you haven't installed any package before)
Then configure your environment setting by making sure the boxes for inheriting global site packages and making this available to other projects are checked.
When configuring your environment setting for the pycharm projects folder, the location path should also end with your pycharm projects folder\venv ; please do not include the name of any particular project in the location path as doing this will make these changes effective in only that particular project files.
Then click ok.
Whatever project your create under the Pycharm projects folder will then inherit every packages you've installed in the pycharm project settings.
I believe this will help those who have been having difficulty resolving this.

AEM+Filevault+Intellij integration

I am working on AEM 6.2 with crx mapped to local file system using filevault. I also have my code in svn for ui.apps which is in intellij.
Problem: If i change any component dialog, first i need to sync my crx with local file system and then copy changes from file system to svn folder.
I tried to integrate intellij using vlt commands but getting message
File is under version control
Is there a way i can club all three together so from IDE i can update code repository?
You can use the IntelliVault plugin to push content to or pull it from CRX.
In such a setup it doesn't matter where your CRX actually sits. You keep a set of files under version control and the IDE plugin allows you to push/pull to/from CRX whenever you want to. It uses the Vault command line tool under the hood.
It's probably not exactly what you're asking about but it works for me.
Another option is to use AEM Sync from the command line. It's a Node package that you can use to listen to file changes. Have it running in the background and changes you make in your IDE will be automatically reflected in AEM. Be careful about large changes such as switching Git branches. These can kill AEM Sync and potentially interfere with AEM itself if you happen to change a very large number of files while AEM Sync is running.
Aem sync works like a charm - https://github.com/gavoja/aemsync
Go to Terminal> CD to the directory where you have installed aemsync via npm > hit the command provided at the github page.

automate setup of IBM RAD and Websphere

In a project we a forced to use IBM RAD and Webspher Application Server (6.1).
Setting up the development environment is currently described in about 10 pages of wiki documentation and takes about a day if you don't do any mistake. The main parts are:
Installing the IBM Installer;
Use it to install RAD
Install a patch to the Installer;
use it to install half a dozen patches to RAD
create a network drive pointing to ...
checkout project source to ...
install WAS
configure the a WAS instance with two jdbc drivers, 6 datasources, a queue ...
I think you get the idea
I'd like to automate that process (or at lest 95% of it) to something like.
start script x.
On prompt enter a directory with at least yGB of memory available.
Get yourself a cup of coffee
start working.
What are the proper tools to get this working? Should I use something like puppet and chef? Or is that overkill and I can just zip the installation directory and change 2 registry entries?
Has anybody experience with this? Any pointers to get started?
You can script the configuration of WAS using wsadmin:
http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Finfo%2Faes%2Fae%2Fwelc6topscripting.html
It is some effort to learn how to do so but in the end it saves a lot of time. You need to use Jython or Jacl to do so.
WAS profiles can be created headless with a response file. Use manageprofiles.bat in bin directory of WAS to do so.
Regarding RAD installation you can install the IBM Installation Manager version you need to install the patches right away and then install everything in one shot. Add the fixes you need as Repositiories right from the beginning. The fixes will be installed instead of the old versions in this case. You should have the base images and all fixes on the local disk to do so.
The installation of RAD itself can also run in headless mode but I don't have any experience in doing this.
The configuration of the RAD workspace is the next thing you want to automate. This is not so simple to do. The simplest thing you can do is to export the workspace preferences of a workspace that contains all settings to an eclipse preference file (.epf). File -> Export
This is not a complete solution but may help you a bit. Be sure to keep all settings in just one file and import that into a fresh workspace.
Use Notepad++ TextFX plugin to sort the settings in the epf file. You can then figure out which settings you need just by looking at them.
More control over the workspace settings and automated conifiguration requires accessing eclipse internal APIs and some coding.
Regarding the the project sources it depends on the SCM you are using.