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


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/

NB: How do I create an action which can be invoked by a macro?

Use @EditorActionRegistration!

@NbBundle.Messages({ "CTL_MyAction=Let's go", "macro-name=Let's go" })
	name = "macro-name", 
	mimeType = "text/x-java", 
	menuPath = "Source", menuPosition = 0, menuText = "#CTL_MyAction")
public class MyAction extends org.netbeans.editor.BaseAction {

Now your action can be invoked by a macro using its macroname (the name attribute in the @EditorActionRegistration-Annotation) and even recorded by the macro recorder.

[1] http://wiki.netbeans.org/DevFaqAddMacroableAction

Quicktips: Nice little features in NetBeans’ JS-Editor

Currently there is a MOOC on Oracle JET (https://blogs.oracle.com/geertjan/entry/sign_up_free_today_oracle), which I am attending. I am not a JS developer for my daily living, so there was no need for me to use the JS editor of NetBeans until now. So I was surprised by some cool features in NetBeans 8.1:

  • Drag & Drop of js files into HTML generates script tags
    2016-08-28 13h49_57.gif
  • Pressing ‘ or ” or ( or { on a selected text encloses the text
    2016-08-28 13h56_18.gif

Quicktip: How to customize the names of Maven project nodes

Since NetBeans 7.4 you can configure the name of Maven-based project via options at “Tools|Options|Java|Maven|Appearance”. No additional plugin is required.


For other useful features have a look at the “New and Noteworthy” pages at http://wiki.netbeans.org/NewAndNoteWorthy

NB: How to create toggle-able action for toolbars/menu bars?

For a new NetBeans plugin of mine I was in the need to create a toggle-able action for the toolbar/menu. It took a while, but after some research I found the gem in the NetBeans API: org.openide.util.actions.BooleanStateAction [1]. Easy to use, once you know of its existence. I documented it at [2].

Using it you can create toolbar buttons like this, which behave like JToggleButtons: 2016-06-03_00h07_56.png

Bonus: If you like to create a toggle-able Action, which is bound to a boolean value from a property file (/configuration file) then org.openide.awt.Actions.checkbox  [3] is the solution. An example can be found at [4]

[1] http://bits.netbeans.org/dev/javadoc/org-openide-util-ui/org/openide/util/actions/BooleanStateAction.html
[2] http://wiki.netbeans.org/DevFaqToggleActionAddToEditorToolbar
[3] http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/Actions.html#checkbox-java.lang.String-java.lang.String-java.lang.String-java.lang.String-boolean-
[4] http://wiki.netbeans.org/DevFaqCheckableActionPreferenceOption

Eclipse formatter for Java – Compatibility fork 4.4

As you already know, I provide a NetBeans plugin to format your Java code using the Eclipse formatter engine. Currently the 4.5.x engine is embedded.

But there were several complaints that this version does not format the same way as it does using the previous version. There is a reason for that: The Eclipse formatter has been changed in an incompatible way [1]. Other formatter plugins like the one for Intellj Idea are also affected [2]

But here is a good news for all the brave NetBeans Java developers, who are still in such an environment of 4.4.x Eclipse installations: Now I provide a 4.4-fork of my own plugin. It has the same features and issues like the 4.5 plugin, but it uses the other engine and the plugin has been updated to be installed side by side to the original plugin.


The plugin is already available from the update center from within your NetBeans IDE. Or you can download it from the plugin page [3] or from github [4].


[1] http://eclipse-n-mati.blogspot.de/2015/06/eclipse-mars-how-to-switch-back-to.html
[2] https://github.com/krasa/EclipseCodeFormatter/issues/51
[3] http://plugins.netbeans.org/plugin/64061
[4] https://github.com/markiewb/eclipsecodeformatter_for_netbeans