IDE4RomulusEclipse

IDE4Romulus Eclipse for Roma <Meta> Framework v.2.1.0

This component has been developed by Imola Informatica in cooperation with the University of L'Aquila, Department of Computer Science, Master in Web Technologies.

The Roma <Meta> Framework actually supported is the v.2.1.0. For older version see below.

User Guide

Create a Roma Project

In order to create a Roma application, go to File -> New -> Project.

The following dialogue will be open:

 

 

 

 

Choose “Roma Project” as category for the project, and then choose the project type.

Click “Next” and a new dialogue will be open:

 

 

 

 

Fill the “Project Name” and “Domain” fields. Press Finish and the project will be created.

If the project is not createtd in the Eclipse workspace directory, it will be asked to import the project in the current workspace:

After the project creation process, if the current perspective is different from “Romulus”, the following dialogue will show up.

 

 

 

Add Modules

In order to add a new module to your project, the user has to follow the following steps:

  1. Right click on the project folder in the “Package Explorer” view.

  2. Go to Romulus -> Add Modules...

  3. Select the modules to install in the project and click Finish button

The command will add the desired module with its dependencies.

Generate CRUD

In order to generate CRUD for a specific domain class, the user have to “right click” on that class and, in the pop-up menu, choose Romulus -> Generate CRUD.

 


 

The command automatically creates the Java classes necessary to manage the CRUD.

Views and Editors

With the Romulus Perspective are associated two views: the Romulus Outline view and the Romulus Hierarchy view. These views are placed, by default, on the right of the editor area, as shown in the following illustration:

 

 

Romulus Outline

This view is similar to the Outline view offered by Eclipse IDE. In this view all the element of a class are shown. In particular if a class is a “composed entity”, a pattern particularly used in Roma applications, the view will assume the following aspect:

 


 

The MyComposedEntity is the class that extends, following the pattern Extension-by-Composition, the class Entity.

In this view each element is clickable. If the user clicks on a showed element, the class in which that element is declared will be opened in the editor, while the cursor is set to the declaration line.

Romulus Hierarchy

This view is similar to the Hierarchy offered by Eclipse IDE. In particular the user opens an entity class in the editor, the view shows all the composed entities that extend this entity class.

 

 

As shown in Illustration 14, if the user double-clicks on a class element present in the view, let's say MyComposedEntity2, the related Java file will be opened in the editor.

Editors

The plug-in provided an editor called Romulus Editor, which is designed to present to the user the different aspects of a POJO. The editor contains three tabs, each of them showing the different aspects of the POJO: the first one shows the source code of the POJO, the second one shows the view aspect (it opens the xml file associated with the POJO)  the third  shows the persistence aspect (open the package.jdo file) and the last shows the I18N aspect (it opens all domain_messages_locale and shows all the prooerties associated with the pojo files )

 

 

 

I18N

The I18N tab allow to insert, delete and to modify all the property shown by the editor, to modify or insert or delete properties right click on the property row and select the action to perform it will show this menu.

 the Insert Row and the Edit Row action will open the following Dialog.

Refactor Support

The refactoring support comprehends:

class name refactoring

  • it performs the ranaming of the xml files associated with the project

  • if performs the renaming of the CRUD files associated with the domain classes about to be renamed

field name refactoring

  • it performs the renaming of the field presents on the xml file associated with the project. In this case the attribute: class/fields/fields@name=””.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<class xmlns="http://www.romaframework.org/xml/roma" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:schemaLocation="http://www.romaframework.org/xml/roma http:// www.romaframework.org/schema/roma.xsd">

<fields>

<field name="field1">

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<class xmlns="http://www.romaframework.org/xml/roma" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:schemaLocation="http://www.romaframework.org/xml/roma http:// www.romaframework.org/schema/roma.xsd">

<fields>

<field name="field1NEW">

 

  • it performs the renaming of the CoreClass(orderFields) annotations that include the field renamed by the standard Eclipse refactoring

@CoreClass(orderFields = "field1 field2 field3", orderActions = "doSomething")

public class ClassA implements ComposedEntity<ClassB>{

@ViewField(selectionField = "entity.field1")

protected int field1; → field1NEW

protected int field2;

protected int field3;

@CoreClass(orderFields = "field1NEW field2 field3", orderActions = "doSomething")

public class ClassA implements ComposedEntity<ClassB>{

@ViewField(selectionField = "entity.field1")

protected int field1NEW;

protected int field2;

protected int field3;

 

 method name refactoring

  • it performs the renaming of the methods presents on the xml file associated with the project. In this case the attribute: class/actions/action/@name=””.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<class xmlns="http://www.romaframework.org/xml/roma" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:schemaLocation="http://www.romaframework.org/xml/roma http:// www.romaframework.org/schema/roma.xsd">

<actions>

<action name="doSomething">

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<class xmlns="http://www.romaframework.org/xml/roma" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:schemaLocation="http://www.romaframework.org/xml/roma http:// www.romaframework.org/schema/roma.xsd">

<actions>

<action name="doSomethingNEW">

 

  • it performs the renaming of the CoreClass(orderActions) annotations that include the field renamed by the standard Eclipse refactoring 

@CoreClass(orderFields = "field1 field2 field3", orderActions = "doSomething")

public class ClassA implements ComposedEntity<ClassB>{

@ViewField(selectionField = "entity.field1")

protected int field1;

protected int field2;

protected int field3;

public void doSomething(){} → doSomethingNEW

@CoreClass(orderFields = "field1NEW field2 field3", orderActions = "doSomethingNEW")

public class ClassA implements ComposedEntity<ClassB>{

@ViewField(selectionField = "entity.field1")

protected int field1;

protected int field2;

protected int field3;

public void doSomethingNEW(){}

 
 In addition to the previous renaming features, the plug-in permits the renaming of the changed fields associated with the interface ComposedEntity.

 

public class ClassB {

private String field1; → field1NEW

private String field2;

private String field3;

...

}

 

@CoreClass(orderFields = "field1 field2 field3", orderActions = "doSomething")

public class ClassA implements ComposedEntity<ClassB>{

@ViewField(selectionField = "entity.field1")

protected int field1;

protected int field2;

protected int field3;

 

 

@CoreClass(orderFields = "field1 field2 field3", orderActions = "doSomething")

public class ClassA implements ComposedEntity<ClassB>{

@ViewField(selectionField = "entity.field1NEW")

protected int field1;

protected int field2;

protected int field3;

 

ATP Integration

IDE4Romulus Eclipse Plugin also permits integration with ATP [http://www.ict-romulus.eu/web/atp4romulus].

There are two new button in the Romulus menu on the Eclipse interface:

  • Generate Test...
    • Generates the tests after a configuration phase

  • Clean Test
    • Cleans the tests previusly generated
  • Run Tests (NOTE:  you have to install the module wizard-test before running the tests!)
    • Runs the tests and makes reports
    • After you can see the following new folder on your project

 

Generate Default Domain Class Persistence

In order to generate default persistence for the domain class, it is possible to right click on domain classes and choose command Generate Default Class Persistence in the Romulus menu.

 

 

 

 

The command will create the nodes that correspond to the field of the domain class. The customization of the xml file is delegated to the user.

 

 

Generate Default I18N Entries

It is possible to generate default I18N entries, right clicking on a domain class and choosing from the Romulus menu, the Generate Default I18N command:



 

Automatically, it will create the keys for fields and methods declared on the class. The user has only do personalize the entries for each key and each lenguage.

 

 

Software Requirements and Dependencies

In order to use the Roma Framework plugin for Eclipse, the following software products must be present in the environment:

 

Building From Sources

Get Sources

The source code is available on line in the the SVN (subversion) repository for Romulus Project. The url is:

Once created the directory where the source code should be stored (IDE4Romulus, for example), by using a subversion shell client, it's possible to download the project by typing:

    svn co https://ict-romulus.svn.sourceforge.net/svnroot/ict-romulus/brances/IDE-Plugins/EclipsePlugin

Compile Sources

In order to compile the source code, the Maven repository should contain the libraries from which the project depends. Unfortunately, not all the project dependencies may be resolved automatically by Maven, since there are some libraries that are not available in the online Maven repositories. In order to solve this, the libraries must be manually installed in the local Maven repository.

  • The first step, afterwards, is the population of the Maven local repository with the Eclipse libraries for the the Plugin development:

     

    mvn -Declipse.workspace=<path_to_eclipse_workspace> eclipse:add-maven-repo

     

The output of the execution for this command depends on the distribution of the Maven plugin for Eclipse installed in the environment.

  • The second step concerns the Roma configuration. The environment variable ROMA_HOME should be defined pointing to the the Roma Framework installation directory.  

Build It All

In the EclipsePlugin directory execute the command:

    mvn package

The result of the building phase is the file eclipsePlugin_x.jar.

 

Binary Distributions

The binary distributions for IDE4Romulus are available on line in the the SVN (subversion) repository for Romulus Project. The url is:

At the moment, two versions are distributed:

The following Roma Modules have to be installed on the Eclipse distribuzion:

 

 

IDE4Romulus Eclipse Installation

 

The installation is completed only by copying the EclipsePlugin_x.jar in the directory:

<Eclipse_Home>\plugins

 

Testing the Installation

In order to test the installation, the following steps may be performed:

  1. Run your Eclipse application.

  2. Go to Help -> About Eclipse Platform -> Plug-in Details.

  3. Check if an entry named “EclipsePlugin Plug-in” exists.

If so, the plugin is correctly installed, otherwise there are some problem with the plug-in dependencies.

Old Versions

In order to retrieve the old version on the repository, follow the following.

Note: The old version are not supported anymore. All the old versions are based on the Roma <Meta> framework v.1.2.0 which does not suite with the ATP4Romulus.

Get sources

The source code is available on line in the the SVN (subversion) repository for Romulus Project. The url is:

Binary Distribution

The binary distributions for IDE4Romulus are available on line in the the SVN (subversion) repository for Romulus Project. The url is:

At the moment, two versions are distributed: