1
votes

I am getting started with Firefox addon development and have got myself acquainted with the Add-on Builder. Is this wizard all I need to get deep into Firefox addon development (if so, where would I create the XUL files and how would I create a custom toolbar?). Or is it that one cannot implement all features using this Add-on Builder? Also are there any good tutorials which explain how to get started with Firefox addon development using the Add-on Builder (because it seems so much easier).

Tutorials which I already have referred to:

But these are not specific to using the Add-on Builder. I would please like someone to point me to where I can find help to develop using the Add-on Builder.

Also if I am developing the addon locally using the SDK is there any good editor which I can use which will show me the list of commands that I can execute (like Eclipse in Java).

The red line is where i want my icon to appear. Is it possible to do it using the addon builder.

enter image description here

2
That's some questions too many for one question ;). In particular, you should probably create a separate question to ask about editors. - Wladimir Palant
I agree. Its just that in my quest to know more i got carried away - user1179510
Your screenshot shows a toolbar that isn't there by default - your users likely won't have it. - Wladimir Palant

2 Answers

7
votes

There are currently two kinds of Firefox extensions:

  • Classic extensions use a XUL-based user interface. They can do almost anything but it might take a bit until you see some results with your extension. For documentation on classic add-ons see How do I write a Firefox Addon?
  • Extensions based on Add-on SDK use HTML for user interface. The SDK provides a simple but limited API. In particular, it explicitly won't let you create toolbars, only single toolbar icons (which makes sense, extensions shouldn't be wasting so much screen space). It won't let you determine the icon placement either - as of Firefox 4 all extension icons are supposed to appear in the add-on bar (the user can customize the toolbars and change the placement however). You can get low-level platform access with chrome authority however. The official Add-on SDK documentation is pretty much all you've got here I think.
    Edit: Ok, the information on limitations of the Add-on SDK is somewhat outdated. As of Firefox 30, adding toolbars is possible. Also, as of Firefox 29 the icons are placed in the main toolbar by default - the add-on bar is no more. So the only real limitation remaining is the icon placement.

The Add-on Builder is merely a web interface to the SDK - it allows you to edit the extensions conveniently but otherwise it uses Add-on SDK to generate the extensions.

3
votes

To put an icon directly in the toolbar currently, your best bet is to use Erik Vold's toolbar module ( available in Builder as a package ). here is an example that does that:

https://builder.addons.mozilla.org/addon/1044724/latest/