Komodo addons (previously known as extensions) are used to extend the functionality of the IDE. Komodo is based upon the Mozilla framework, so it has the same addon capabilities as Firefox does, which means the Mozilla extension documentation also applies to Komodo as well. These Mozilla resources are a great place to begin understanding the fundamentals of addons.
Addons are managed through the Komodo Packages interface.
Extensions usually come in two flavours:
Note that the type of addon you wish to create will affect how you go about the creating process.
The best way to start creating a new Komodo feature is by utilizing the Komodo userscript system, which you can use to quickly and easily create new functionality for Komodo, such as adding user interfaces, responding to keypresses, opening files, or performing text manipulation in the Komodo editor.
If you wish - you may then turn your userscripts into a Komodo add-on (so it's easily installable and will automatically update when you make changes to it). To get started, use the Project -> New -> New Project from Template and select the Create Komodo Extension project. When using a Komodo addon project, you'll find there is a "Build and Install" userscript added to your Komodo toolbox, which you can use to create and install the addon xpi file.
Language addons are used to extend Komodo's knowledge of programming languages (like Java, Matlab, Mel). This can control things like Language Detection, Code Coloring, Editor Indentation, Syntax Checking, Code Intelligence (completions and calltips) and Debugging.
The easiest way to create a new Komodo language is to use the Project -> New Project from Template and select the Create Komodo Language project. Fill out the addon details, then you can customize the language details (like the comment styles, keywords and code intelligence) and create the project. You'll find there is a "Build and Install" macro added to your Komodo toolbox, which you can use to create and install the addon xpi file.
Once you've got the basics of the language down, you can further tweak the generated files to your liking and then re-build and re-install the add-on to test it out. Below is a description for the generated files and folders of the add-on:
Komodo's system for defining multi-language syntax lexing (coloring) is called UDL (User Defined Languages). UDL files are written in a language called Luddite, which then gets compiled into a Scintilla lexer package for use inside Komodo. All udl files are stored inside the "udl" folder of your extension.
Code Intelligence is enabled in a Komodo language addon by adding a pylib/codeintellangname.py_ file to your extension. It works by first triggering a completion event and then responding to an evalutation request.
You should install these useful addons when developing your own Komodo addon:
To install them hit the "Go to Anything" search field in your toolbar, or use the shortcut Ctrl+Shift+O (or CMD+Shift+O if you're on OSX), then select "Packages" and search for the package name you wish to install, and press enter on it to install it.
To create an addon select from the menu
Project > New from template > Create Komodo Extension. This will then open up a window to select a working directory where the project files will be generated and stored.
It will then open up a new windows titled 'Welcome to the New Komodo Extension'.
This dialog holds the following fields:
Once completed click on next and it will display a new windows with instructions
Go ahead and read it and then press Finish.
Once you finish the short wizard to generate your addon Komodo will create a couple of files and tools for you to work with.
There are four main files.
This is the projectname overlay file that will be displayed when the extension is installed.
This file is used to register your content with the Chrome engine.
This is a development.
This file contains general information about your extension and the developers information.
More information can be found on Mozilla Developer Website
Several tools are installed in your toolbox when creating a Komodo addon.
This macro will build and create an xpi file of the project
This macro will build and create an xpi file of the project as well as install it on Komodo. Note that this will require a restart of Komodo.
This will allow changes to be made to the install.rdf file.
This will open up the help file to explain Komodo Extensions
After generating your addon (see above) use the toolbox to run the tool 'Build and Install'. This will display the classic Add-ons manager window.
After installing the extension you will be prompted to restart Komodo in order for the changes to take effect.
Now you're set to start creating your own addon. The easiest way to get started is to reference existing addons or check the additional resources below to find out how to write a Komodo addon. Note that Komodo is based on the same system as Firefox, so most things that apply to Firefox addon development also apply to Komodo.
These projects can serve as a good foundation to work-by-example.
GitHub provides a fast source code search engine. You can use this tool to find code examples for working with different parts of Komodo.
Thanks to Komodo being based upon the Mozilla framework, Komodo has the same addon capabilities as the Firefox browser, making Komodo addon development a breeze - you can even re-purpose existing Firefox addons to work within Komodo.
These are the Komodo add-ons that are included in the regular Komodo builds. You will also find these add-ons in the "extensions" or "distribution/bundles/" directory of your Komodo installation.
There are many Komodo add-ons that have been developed, which are not included in the regular Komodo installers. A lot of these are hosted on GitHub and are great examples for building Komodo addons.
© 2017 ActiveState Software Inc. All rights reserved. ActiveState®,
Komodo®, ActivePerl®, ActivePython®, and ActiveTcl® are registered
trademarks of ActiveState.
All other marks are property of their respective owners.