One of the most common issues raised by our users (for example, in a recent discussion of the Demetra roadmap on theserverside.com) is that developing plugins for IntelliJ IDEA is too hard. We do hear the feedback, and one of the things we did in response to it was gathering all relevant information for plugin users and developers in a single easy-to-find location on our Web site. Today I’m going to describe some of the improvements in IntelliJ IDEA itself that we’re doing to make it easier to develop plugins. Part of these improvements is already available in the IntelliJ IDEA EAP build 4069, and others were checked in by me just a few minutes ago and will be included in the next EAP build for IntelliJ IDEA 5.1.
The improvements I’m talking about provide a very easy way to create new application, project and module components, and (after my today’s changes) actions. The development of almost every plugin starts with creating a component of one of those types, and previously it was necessary to create a class and then manually register it in the plugin.xml file. Now this has been automated.
Selecting one of the new menu items which are available in plugin modules automatically creates a correct component class (from a configurable template) and adds registration for the component to plugin.xml.
For actions, it is also possible to specify the essential parameters in a dialog:
The greatest value provided by the dialog shown above is probably the possibility to browse the action group structure. Previously it was necessary to search for the action ID in the IdeActions class, or if the action is not present there, in the ActionManager.xml file which can be found deep in the resources of IDEA. Now you can easily view the list of all groups to which plugin actions can be added. When a group is selected, you can also choose the action before or after which the new plugin action should be placed.
Another related feature worth noting (also added in build 4069) is the possibility to automatically generate externalization code for plugin components which need to store their settings between runs of IDEA.
The action will change the component so that it implements the JDOMExternalizable interface, and delegate the serialization implementation to the DefaultJDOMExternalizer class.
And this is not the end - we have some more ideas on making it easier to start developing plugins, and we’re also working to provide more documentation and introductory articles for plugin developers.
Posted by Dmitry Jemerov at December 14, 2005 10:02 PM