How to develop your IntelliJ IDEA plugins even faster with JRebel

Back in my NetBeans times I wrote several articles (1, 2) about using Zeroturnarounds JRebel to develop NetBeans plugins faster by not restarting nor reloading the whole target-platform. JRebel is a Java agent, so it can be used with nearly every Java-based application. Even for developing IDEA plugins. And here is how you do it:

One-Time-Setup

  1. Buy a JRebel license or get a free one for your open-source plugin at myRebel
  2. Install the JRebel plugin for IDEA from the plugin manager (for bundling JRebel, a configuration UI and debugging support)
  3. Activate the plugin using the license from step 1
  4. Update the your Run- or Debug configuration with the Java agent configuration – based on the standard documentation)
    For example: -agentpath:/Users/markiewb/Downloads/jrebel/lib/libjrebel64.dylib
    runconfiguration

Every-day-workflow

  1. Run / debug your plugin using the configuration created above – JRebel should show its banner and an IDEA instance should load
    banner
  2. Edit your Java sources as normal and when you want to get the changes reloaded then compile the project/all the changed files (thus the sources are compiled into class-files and JRebel can pick up the changes)
  3. Reinvoke your plugins actions (or what ever) in the target platform – your changes should be picked up

Notes

Note 1 Not all changes will be picked up. JRebel does not have yet official support for this usage scenario. Especially changes in the plugin.xml won’t be picked up. But within existing or new Java classes you can code and refactor as much as you like!

Note 2 If you are on Mac OS consider to install JRebel separately. I had issues to set the Java agent with the bundled JRebel from the JRebel IDE plugin. Do you see the culprit in -agentpath:/Users/markiewb/Library/Application Support/IntelliJIdea2017.2/jr-ide-idea/lib/jrebel6/lib/libjrebel64.dylib? The whitespace!

Note 3 Of course this also works when you write plugins for the other Java based IntelliJ platform IDEs like WebStorm, PHPStorm and so on.

Advertisements

IDEA: Navigator plugin for GWT

Within the last two days I wrote a new plugin, which allows you to jump faster between files of GWT services.

Using IDEAs “Related symbols” action you can jump from the async method in the interface to its implementation and vice-versa – all based on filename conventions and it is nice example of a GotoRelatedProvider.

Here you jump between files:

Here you jump between methods of files:

https://plugins.jetbrains.com/plugin/9912-navigator-extension-for-google-web-toolkit

This plugin requires the community edition of IntelliJ IDEA.

Missing plugins for your NetBeans nightly builds?

Do you use a Nightly-/Dev-Build of NetBeans or even a release candidate of 8.2 within the NetCAT-program and you are missing some of your favorite plugins?

First there is no plugin center for Dev-Builds. Also most plugins from the 8.1 plugin center are not verified for the new 8.2 build yet – including my plugins.

Nevertheless in the meantime you can still use the plugins and give the plugin authors feedback of the compatiblity to 8.2. Some plugins won’t work, because of using non-public API, but that is the point to find out!

How to do that?

At Tools|Plugins|Settings add the plugin center URL for 8.1 [1] and then at Tools|Plugins|Available Plugins click at “Check for Newest

Additional

If you are interested in testing non-verified plugins see the article [2]

[1] http://plugins.netbeans.org/nbpluginportal/updates/8.1/catalog.xml.gz
[2] https://benkiew.wordpress.com/2013/02/03/netbeans-ide-verification-of-plugins-and-update-center-urls-for-non-verified-plugins/

NetBeans IDE: Verification of plugins and update center URLs for non-verified plugins

You developed a cool NetBeans plugin? Now you want it be to be available via the official update center, so that it can be installed directly from the NetBeans IDE via the built-in Plugins Manager and gets more attention from the users?

Then you have to adhere to the verification and quality rules defined in [1] and [2]. You have to define a license, sign the package and so on. Your plugin will also be tested from several trusted community members and they give a go or a no-go. For some plugin developers this process seems to be too much overhead and too time-consuming. They do not request a verification and therefore their plugin is not available in the Plugins Manager from your IDE. That is a pity, because this way you miss many useful plugins (Geertjans plugins, Compare to clipboard, JVisualVM samples, …). For example there are only 67 of 136 plugins verified for NB 7.2.

Of course you could download the plugin manually from the plugin portal at [3] and install them manually, but this not very comfortable IMHO. It is also not reasonable for me to contact all the authors and beg them for getting their plugins verified. So i opened a ticket [4] for an update center which contains those non-verified plugins. And guess what. The NB team now provides such URLs:

As warning: Using these URLs you are going to install non-verified, experimental and non-quality-checked plugins, which could make your NetBeans IDE unstable/slow down or even crash. Only install plugins you know and trust. You can be sure that the NetBeans developers will not support any issues regarding these plugins.

You want to have more quality plugins available and don’t want to go this inofficial way of experimental update centers? So please encourage the authors of your favorite plugins to request a verification. Thank you!

[1] http://wiki.netbeans.org/FaqPluginRequirements
[2] http://wiki.netbeans.org/PluginPortalQualityCriteria
[3] http://plugins.netbeans.org/
[4] http://netbeans.org/bugzilla/show_bug.cgi?id=225104
[5] http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz