Jindent - Java Source Code Formatter http://www.jindent.com
 



title

7.4 IntelliJ IDEA Plugin


Introduction to IntellIJ IDEA


Quote from the IntellIJ website:

"IntelliJ IDEA is an intelligent Java IDE intensely focused on developer productivity. It provides a robust combination of enhanced development tools, including: refactoring, J2EE support, Ant, JUnit, and CVS integration. Packaged with an intelligent Java editor, coding assistance and advanced code automation tools, IDEA enables Java programmers to boost their productivity while reducing routine time consuming tasks."

An evaluation version can be downloaded from developer website at: http://www.intellij.com/



Manual installation of Jindent's IntelliJ IDEA plugin


If you have already used the Jindent installer to install the Jindent plugin for IntelliJ IDEA then you can skip this section.

If not please proceed the following steps:
  1. In the Jindent installation directory you will find a /plugins/IntelliJIDEA60/ subdirectory. Change into this subdirectory and copy the located jar file to:
    $INTELLIJ_IDEA_HOME_DIR/plugins/jindent/lib/
    Note: You have to create the /jindent/lib/ directory tree by yourself!

  2. Now go back to the Jindent's installation directory and additionally copy all files in subdirectory /lib/ to:
    $INTELLIJ_IDEA_HOME_DIR/plugins/jindent/lib/

That's all! The IntelliJ IDEA plugin is installed now.



Usage of Jindent's IntelliJ IDEA plugin


Now start IntelliJ IDEA to verify the proper installation of Jindent's plugin.

Formatting in Editor Window

If the Jindent plugin is installed properly then a Jindent menu item is available in the editor context menu of IntelliJ IDEA. For verification open a file in the editor window. Click right button to open context menu. A menu item Format <filename> with the Jindent logo is now available.
Click on it to format your source code in current editor window.


Jindent menu item in editor's context menu
Jindent menu item in editor's context menu



Formatting in File Navigator

Click right button to open context menu in the file navigator. A menu item Format <filename> with the Jindent logo is available now.
Click on this item to format selected files or directories.


Jindent menu item in file navigator's context menu
Jindent menu item in file navigator's context menu



Configuring Jindent Settings

To configure Jindent's settings just click on the 'Settings' symbol in IntelliJ IDEA toolbar.
Then click on the Jindent icon to open Jindent's settings dialog.


Click on Jindent's icon to configure the plugin
Click on Jindent's icon to configure the plugin


To learn how to configure Jindent's settings and how to use Jindent's customizer please refer to section 'Settings' and 'Graphical User Interface' in this manual.
Of course the customizer's full preview and Help-On-Click support are enabled in this plugin!



Settings of Jindent plugin
Settings of Jindent plugin



Displaying Jindent Messages

Depending on the configuration of Jindent's message settings several messages can pop up after formatting process. In IntelliJ IDEA these messages will be displayed in a Itool window. By clicking on a displayed message an editor window opens which shows the file causing this message. The cursor is located on the line which is the origin of this message.


Jindent messages, warnings and errors will be displayed in a special tool window
Jindent messages, warnings and errors will be displayed in a special tool window



Undo Jindent Formatting

All Jindent formattings are undo-able. To withdraw a formatting just click on Undo in the Edit menu.


Click on Undo to withdraw Jindent's formatting
Click on Undo to withdraw Jindent's formatting