MaintainJ 1.0, an Eclipse plug-in, has been released. MaintainJ generates sequence and class diagrams for a given use case, helping users to quickly understand a complex Java or J2EE application. It logs runtime method execution sequence to a file and uses that trace file to render sequence and class diagrams.
MaintainJ logs runtime method execution sequence to a file and uses that trace file to render sequence and class diagrams. MaintainJ Instrumentation Wizard instruments a Java/J2EE application and MaintainJ UML Editor renders sequence and class diagram from the trace file.
The following features make MaintainJ a unique and useful tool for Java developers.
Source Untouched: The application code is not changed in anyway; application is rebuilt using AspectJ compiler to capture the method execution sequence at runtime.
Collapsible Calls: Method calls in sequence diagram are collapsible. Developers can easily explore a complex sequence diagram by collapsing and expanding calls as necessary.
Focused Diagrams: Only application classes are shown in the diagrams. The classes in the diagram can further be narrowed by instrumenting only the packages of interest.
Runtime Diagrams: All classes shown in the diagrams are concrete runtime classes.
No Loop Calls: All repeat calls occurring in a loop except the first call are removed. Recursive calls also are removed.
Eclipse Integration: Double clicking a method call or class opens matching method or class in Eclipse.
Outline Views: Outline views in both diagrams make navigating a complex diagram simpler.
Print or Export: Diagrams can be printed or exported as JPEG images.
MaintainJ generates sequence and class diagrams for a use case by capturing the sequence of method executions.
MaintainJ instruments a Java application using AspectJ to capture the method execution trace at runtime. While running the instrumented application, the method execution sequence is logged to a file. MaintainJ Instrumentation Wizard instruments a Java/J2EE application in a series of wizard steps.
MaintainJ UML Editor renders sequence and class diagram from the trace file.
MaintainJ Instrumentation Wizard
MaintainJ Instrumentation Wizard plug-in helps the user to instrument a Java/J2EE application in Eclipse based IDE, using AspectJ. While running the instrumented application, start and end points for method call logging can be specified by the provided JSP for a J2EE application or a Swing window for a Swing application.
MaintainJ UML Diagram Editor
When the call trace files are opened in Eclipse with the MaintainJ UML Diagram Editor plug-in, sequence and class diagrams are generated.MaintainJ plug-ins can be used in any IDEs that are based on Eclipse 3.2 or newer versions.
1. Software Requirements
- Eclipse 3.2 or newer
- GEF 3.2 or newer – Graphical Editing Framework plug-in; used to render UML diagrams
- AJDT 1.4 or newer – AspectJ Development Tools plug-in; used to instrument the Java application
2. MaintainJ Update Site
MaintainJ plug-ins are published as a feature and can be installed using Eclipse Feature Update mechanism in one go.
Update Site URL : http://www.maintainj.com/updates/1.0
To install using the update site, follow the steps below.
- Install Eclipse 3.2 or later
- Click ‘Help–>Software Updates–>Find and Install’
- Choose ‘Search for new features to install’
- In the dialog box opened, enter the MaintainJ update site url
- In the ‘Search Results’ window that pops up, choose MaintainJ Feature 1.0 and follow the next wizard steps.
3. Installing just the MaintainJ Plug-ins
If the required versions of plug-ins already exist, MaintainJ plug-ins can be downloaded and installed from the following links. Unzip the zip files to <<EclipseRoot>>/plugins folder and restart Eclipse.
4. Installing on Eclipse 3.0 based IDE’s like RAD 6.0.0
MaintainJ UML Editor plug-in is not supported on Eclipse 3.0. Rational Application Developer version 6.0.0 is based on Eclipse 3.0 and so does not support MaintainJ UML Editor.
However, MaintainJ Instrumentation Wizard can be used on Eclipse 3.0 (and on RAD 6.0.0) by installing the following plug-ins:
AJDT 1.2.3 for Eclipse 3.0
Once the application is instrumented in RAD 6.0.0 and the trace files (*.ser files) are generated, download Eclipse 3.2 or newer version, install MaintainJ plug-ins and open the trace files in Eclipse 3.2 to view the diagrams.
5.1 MaintainJ UML Diagram Editor
Download the sample method call log files and add to a Java project. UML sequence and class diagrams should be shown in Eclipse.
Sun’s PetStore application is instrumented to generate the following trace files.
AddToCart31080535.ser – Trace file for ‘Add to Shopping Cart’ use case.
CompleteOrder31080535.ser – Trace file for ‘Complete Order’ use case.
If these files are downloaded as *.htm (IE may do so), rename them as *.ser before adding to a Java project in Eclipse.
5.2 MaintainJ Instrumentation Wizard
Click ‘File–>New–>Project’ in Eclipse. In the ‘New Project’ wizard, you should see ‘MaintainJ–>MaintainJ Instrumentation Wizard’.