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



title

7.3 JDeveloper Plugin


Introduction to JDeveloper 11g


Oracle JDeveloper is an integrated development environment with end-to-end support for modeling, developing, debugging, optimizing, and deploying Java applications and Web services.

JDeveloper can be downloaded from: http://otn.oracle.com/products/jdev/



Manual installation of Jindent's JDeveloper 11g plugin


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

If not please proceed the following steps:
  1. In the Jindent installation directory you will find a /plugins/JDeveloper11g-11.1.1/ subdirectory. Change into this subdirectory and copy the located jar file to:
    $JDEVELOPER_HOME_DIR/jdev/extension/jindent.plugin.jdeveloper.4.x.x.jar


    You need to create the folder structure by yourself.
    4.x.x again denotes the current version number of this Jindent release. For instance, copy all files to:
    $JDEVELOPER_HOME_DIR/jdev/extension/jindent.plugin.jdeveloper.4.0.x.jar
  2. Now go back to the Jindent's installation directory and additionally copy all files contained in subdirectory /lib/ to:
    $JDEVELOPER_HOME_DIR/jdev/extension/jindent.plugin.jdeveloper.4.x.x/lib/
    Where 4.x.x again denotes the current version number of this Jindent release. For instance, copy all files to:
    $JDEVELOPER_HOME_DIR/jdev/extension/jindent.plugin.jdeveloper.4.0.x/lib/

That's all! The JDeveloper plugin is installed now and you can start JDeveloper to use the Jindent plugin.



Usage of Jindent's JDeveloper 11g plugin


Now start JDeveloper 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 JDeveloper. 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 select menu item Preferences... in the Tools menu. Now you can select item Jindent from the Preferences tree.


Settings of Jindent plugin
Settings of Jindent 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!


Displaying Jindent Messages

Depending on the configuration of Jindent's settings several messages can appear after formatting process. In JDeveloper these messages will be displayed in an integrated Jindent console. By clicking on a displayed message the corresponding editor opens up and shows the file causing this message.


Jindent messages, warnings and errors will be displayed in a console
Jindent messages, warnings and errors will be displayed in a console



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


Associating Jindent with Hot Keys

To invoke Jindent with editor's hot keys, just select menu item Preferences... in the Tools menu and select item Accelerators from the Preferences tree.
Then select Jindent in the Actions list and click into field New Accelerator. There you can press the hot keys which you like to associate with the Jindent formatting action. For instance press CTRL + J.
Then click button Add to confirm and finally click button OK to close the preferences windows.


Assigning hot keys to Jindent action
Assigning hot keys to Jindent action



Now you can invoke Jindent from any editor window by just pressing the hot keys CTRL and J.