Tuesday May 06, 2014

YouTube: EditorConfig in NetBeans IDE

A silent movie showing a first usage of EditorConfig integration in NetBeans IDE 8, for indentation:

Or watch it here: http://www.youtube.com/watch?v=DTv9gUvmd5U

Source code: https://github.com/geertjanw/editorconfig-netbeans

You'll see that I explicitly invoke the Format action after changing the indentation setting in the .editorconfig file. The alternative would be that all the files within the package/s owned by the .editorconfig file would automatically be reformatted. Not sure if that is desirable. But, let me know if you disagree!

Also note that I start by choosing a template. I think it will be cool to have multiple different templates available with typical settings for different scenarios. (And of course anyone is able to create their own NetBeans module that installs their own templates into the central location where .editorconfig templates are found, thus making this solution extensible.)

It works for all types of projects, e.g., PHP, HTML5, Java, NetBeans modules. Especially teams where Sublime is used together with NetBeans will find this interesting, since EditorConfig is more or less a standard and this lets formatting settings be shared amongst developers using different IDEs.

Before publishing the NBM so that anyone can use it, I need to look at the performance, seems a bit slow, and also work on all the other features of EditorConfig, i.e., right now only indentation is supported.

But now that the basic functionality is working, the rest should be relatively easy to do, assuming there's easy 1:1 matching of EditorConfig features vs. NetBeans APIs.


Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« May 2014 »