IDE for Firefox Add-ons Development
Asked Answered
I

2

9

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?

Interrelated answered 29/5, 2012 at 17:48 Comment(1)
use eclipse and xul runner...it'll generate as .xpi filePhotobathic
S
5

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:

  1. I have Wladimir Palant's 'Extension Auto Installer' installed in Firefox

  2. 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.

Sipe answered 30/5, 2012 at 4:10 Comment(0)
M
3

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. [email protected]).
  • 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).

Misdate answered 30/5, 2012 at 11:6 Comment(2)
Upvoted because of reference to Aptana and Intype. OTOH, your answer is badly written: The question is "IDE for Firefox.." and your answer starts with "You don't really need to create XPI". Uhhh... huh? WAT?Silt
nice buddy, I thought I had to pack the addon every time I needed to test!Amputate

© 2022 - 2024 — McMap. All rights reserved.