Geertjan is a DZone Zone Leader and has posted 468 posts at DZone. You can read more from them at their website. View Full User Profile

Jindent 4.0.10: Tighter Integration with your IDE

03.31.2008
| 4459 views |
  • submit to reddit
Last week saw the release of the 4.0.10 version of Jindent, the commercial source code formatter. More than purely a bugfix release, 4.0.10 provides new and very snug integration of Jindent with both IntelliJ and NetBeans IDE. Here we hit some of the high points. And, if you're a user of Jindent, feel free to share what you think of it!

Jindent offers over 300 different switches and options to define your individual coding style preferences. Amongst these are tabular code alignment/justification, intelligent line wrapping, and header/footer templates. Support for a number of external tools are also provided, from versioning systems to text editors.

Looking at the complete list of changes in the 4.0.10 release, it is clear that this release is primarily focused at IDE plugin improvements:

Jindent installer:

Bugfix:
  • Directory file chooser for IDEs and Java tools is now able to shows hidden directories.


Java formatter:

Bugfix:
  • Fixed Java grammar file which causes a parsing error for field declarations and annotations inside of anonymous classes.
  • Added line wrapping support for expressions after colons in for-each loops.


Jindent NetBeans plugin:

Released new Jindent plugins for NetBeans 6.0
  • Automatic installation through native installer.
  • Formatting menu item in editor's context menu.
  • Formatting menu item in file navigation's context menu.
  • Formatting of single files, directories, packages and whole projects.
  • Editor Undo for all formatting options.
  • Shows formatting progress bar.
  • Build in Jindent Customizer and preview for easy configuration of plugin.
  • Java Help support in plugin.
  • Show messages, warnings and errors in NetBeans console.
  • Click on messages and the according file opens up in editor window. Cursor is located on the source code line which is causing the message.


Jindent IntelliJ IDEA plugin:

Released new Jindent plugins for IntelliJ IDEA 7.0
  • Automatic installation through native installer.
  • Formatting menu item in editor's context menu.
  • Formatting menu item in file navigation's context menu.
  • Formatting of single files, directories, packages and whole projects.
  • Editor Undo for all formatting options.
  • Shows formatting progress bar.
  • Build in Jindent Customizer and preview for easy configuration of plugin.
  • Java Help support in plugin.
  • Show messages, warnings and errors in IntelliJ console.
  • Click on messages and the according file opens up in editor window. Cursor is located on the source code line which is causing the message.

Let's see how easy it is to get started and to see the difference that this new release makes. When you start the installer, you can specify with which IDE you'd like Jindent to be integrated:

At the end of the installer, you get all the info about the latest release, which is quite handy:

Then you start up your IDE. In the case of IntelliJ, you can immediately see in the Plugin area on the right side that Jindent has been installed:

And then... menu items are available on contextual menus, in the explorer views as well as in the editors. In each case, Jindent's distinctive J symbol helps you to see that the item in question is provided by the Jindent plugin:

And now you can format your file using Jindent. Use the Jindent-specific customizer to set your source code formatting options:

Have you used Jindent? How does it compare to the support provided natively by the IDE that you use?

AttachmentSize
jindent-1.png60.56 KB
jindent-2.png74.59 KB
jindent-3.png71.44 KB
jindent-4.png6.07 KB
jindent-5.png9.5 KB
jindent-6.png65.12 KB
Published at DZone with permission of its author, Geertjan Wielenga.

Comments

Rick Ross replied on Mon, 2008/03/31 - 9:06am

Was Eclipse integration already supported in earlier versions of Jindent? I see in the pics above that Eclipse is listed, but I don't see any specific mention of it in the article.

Geertjan Wielenga replied on Mon, 2008/03/31 - 9:18am

Yup, Eclipse was already supported. For example, in the feature history, Jindent 4.0.9 has the following new features for Eclipse:

  • Added new feature to automatic format Java content after opening in Eclipse editor window and before saving Java content from editor window.
  • Since the JRE 1.5.0 Update 07 release Mac OS supports a proper AWT-SWT bridge. The Jindent plugin is now able to embed Jindent's preference panels into the Eclipse SWT GUI.

 

Geertjan Wielenga replied on Mon, 2008/03/31 - 10:54am

Hi Marco, sounds like there should be some kind of source formatter smackdown! Maybe in the form of an article. Jalopy would present their top 10 (or so) best and most defining features and Jident would do the same. (As well as any other source formatter out there, including the IDEs!) That would be cool (and illuminating).

Geertjan Wielenga replied on Mon, 2008/03/31 - 1:55pm

Hi Marco, thanks for the comments [and for liking my blog]. I think I will take up your suggestion, sometime, not sure when, in the coming weeks. Thanks for the idea! And a kind of code formatter smackdown would be fun too. Anyway, I will hopefully look into a comparison of the formatters. The first step is to think up a title... something like "Battle of the Source Code Formatters", except that that doesn't have much of a ring to it. Any ideas would be welcome. I can't continue with this without having a title as a central point of focus. :-)

Lzszlo Hogyishivjak replied on Wed, 2008/04/02 - 6:10am

There is something wrong here. Typically open source teams use multiple developement environments, but they can not afford a non-free solution. Commercial projects usually use one IDE environment but they can use the IDE built-in code formatter.

It looks cool anyway.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.