Overview

eStyle is a style formatter extension for the BlueJ Java IDE. Oftentimes a programmer has difficulty conforming to different style rules at the expense of development time. eStyle provides a way for any programmer working with BlueJ to convert their code to any coding style in seconds, thus increasing efficiency. This extension reduces the time spent manually reformatting code. eStyle formats code depending on the options the user specifies. It formats the specified file on demand by using the Style Conventions, that can be modified. Some key features include setting the format settings to preset Style Conventions such as K&R; Style and Sun Style, formatting braces, whitespace, and indentation.

 

1.0 Requirements

The following requirements should be met to ensure proper working conditions:

  • J2SE 1.5.0 (Java 2 SDK version 1.5.0) or newer must be installed.

  • BlueJ 2.1.1 or newer must be installed

  • Minimum Requirements: 4 Mb of available hard drive space, 64Mb of RAM, Pentium II processor or equivalent (BlueJ minimum requirements)
    Suggested Requirements : 500 Mb of available hard drive space, 512 Mb of RAM, Pentium IV processor of equivalent


2.0 Installation

Extensions are installed by placing the extension jar file into an extension directory. BlueJ has three separate locations for extensions, each giving the extension a different scope. The locations are:

Location Extensions installed here are available:
<BLUEJ_HOME>/lib/extensions (Unix), or <BLUEJ_HOME>\lib\extensions (Windows), or <BLUEJ_HOME>/BlueJ.app/Contents/Resources/Java/extensions (Mac, Control-click BlueJ.app and choose Show Package Contents) For all users of this system in all projects.
<USER_HOME>/.bluej/extensions (Unix), or <USER_HOME>\bluej\extensions (Windows), or <USER_HOME>/Library/Preferences/org.bluej/extensions (Mac) For a single user for all projects.
<BLUEJ_PROJECT>/extensions

Verify Extension Installed

To verify extension installed go to Help > Installed Extensions.

 

Click on the ? to find more information about eStyle.


If eStyle is not there, for more information go to.

[BlueJ Extension Installation Help]

 

3.0 Usage

3.1 Format the Code

Start BlueJ. Open a project and an editor

Click on Format to format the selected class using the current style conventions.

Check out the beautiful 'formatted' code.

4.0 Edit Style Conventions

To edit the style conventions used to format your code or to Export / Import those style conventions the eStyle Editor is used. To access the Editor go to Tools -> Preferences.

 

In the window that pops up go to the Extensions tab and if necessary scroll down to the eStyle section.

To open up the Setting Panel click Edit Style Conventions.

This opens up the Settings Panel where the Style Convention Configuration Files can be edited and customized.

The first section, General, is where Style Conventions can be Imported or Exported - see explanation HERE.

The most important part of the Custom Settings is the Printer section. Here is where the specific Style Rules are defined. As each Style Rule is defined, the window to the right shows the original and formatted sample source code.

Click Ok or Apply if you want to approve this Convention and move on or Cancel to exit the Editor without saving these changes.


New in Release 2.0

Every preference setting has a link to the appropriate manual page that can be accessed via a Java tooltip. To view the tooltip, put your mouse over a setting:

Then click on the link (easier said than done) to view the manual entry in your default web browser

The settings panel has been redesigned. See the general settings walk through HERE


Jalopy now can expand an inline conditional to an "if" statement, as well as add a default case statement to switch blocks that do not have a default case

  • Restrictions: only inline conditionals in assignments and returns will be expanded (e.g. a = b ? c : d; or return b ? c : d;)


[Jalopy Manual]

 

5. 0 Specific Style Conventions

The objective of eStyle is to properly format code to a specified format.eStyle provides many features which can be specified by the user.

eStyle allows the formatting preferences to be specified by the graphical interface.

eStyle checks and formats the following style:

Attachments