Luna_Soft_Logo

USER MANUAL

Overview

ChangeStyle 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. ChangeStyle 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. ChangeStyle 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. For more features look in 5.0 Features.

 

1.0 Requirements

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

 


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.

fig 80

 

Click on the ? to find more information about ChangeStyle .

fig 81

fig 82

If ChangeStyle 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. Optionally open editor.

fig_11before

Right click the Class of choice. Click on ChangeStyle > Format to format the selected class using the current style conventions.(If editor window is open the changes will be immediately visible. Otherwise you must open editor to see window.)

 

fig_11after

The editor window, if open shows the 'formatted' code.

 

3.2 Undo Formatting

NOTE: Only works immediately after formatting code (the code cannot be altered since the last format).

Right click on the class and click on ChangeStyle > Undo.

fig 11

The original code appears in the editor window.

 

4.0 Edit Style Conventions

To edit the Style Conventions used to format your code or to Export / Import those Style Conventions the ChangeStyle Editor is used. To access the Editor go to Tools > Preferences.

fig 10B

 

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

fig_20b

To open up the Setting Dialog click Edit Style Conventions.

 

This opens up the Settings Dialog panel which is where the Style Convention Configuration Files can be edited and customized.

fig 3

The first section, General, is where Style Conventions can be Imported or Exported.

fig 4.1 fig 4.1

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.

 

[Jalopy Manual]

 

5. 0 Specific Style Conventiosn

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

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

ChangeStyle checks and formats the following style:

[Brace]

[White Space]

[Indentation]

[Wrapping]

[Blank Lines]

[Comments]

[Import]

[Environment]

[Fix Javadoc headings]

[Header]

[Footer]

[Sorting]

 

[Additional features]

 

6.0 Credits

Section Author
Overview Stephanie
Features Stephanie
Credit Page Stephanie
Usage: Formatting Tracy
Usage: Editing Mark
Requirements Paul
Installation Paul
<compiling the parts> Mark
<Took overcompiling the parts> Tracy
Final Revisions (QA) Paul
Stage 1 Pictures; Mark
Stage 1 Rework Tracy