IDE4Romulus NetBeans for Roma <Meta> Framework v.2.0.2
This component has been developed by Imola Informatica
Create your first Roma project
In order to create your application, go to File->NewProject...
The action open the following dialog

Choose “Roma” as category of project and then choose the project type you want to create.
After click on “Next” a new dialog will open

Fill up the “Project Name” and “Package” fields. In the end, click “Finish” and the project will be created.
When the creation of the project ends, a warning dialog will appear:

This means you have to install/configure an Apache Tomcat server on your environment.
To do this you have to go to the Services tab, right click on the Servers node tree, click on AddServer button and follow the wizard to configure your Tomcat server.
Finally, go back to the Projects tab, right click on your RomaProject and on the Properties->Run set the Tomcat configuration you already created.
Add modules
If you want to add one or more module to your project, you have to follow these steps:
Right click on your Roma Project folder
Go to Romulus->Roma Add Module

This will open a dialog containing a list of modules you can install. That list depends on the modules available on your Roma Framework installation
The addition of one module comprehends also the modules which it depends on.

Generate CRUD
In order to generate CRUD for a specific domain class, just rigth click on that class and, in the pop-up menu, choose Romulus->Generate CRUD.

After the execution of this command all the java class to manage CRUD are added to your project.

Generate Default Domain Class Persistence
In order to automatically update package.jdo file with new domain class, it is possible to use the command that is present on the Romulus menu; you just right click on the domain class you want to have persistence on, and choose Romulus->Generate Default Class Persistence.

The command automatically scan the domain class and add the correspondent entries on the package.jdo file:

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 language.

Refactoring support
This feature permits the refactoring of a Roma project resources linked with the project itself.
The refactoring support comprehends:
class name refactoring
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 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; |
it performs the renaming of the ViewField(selectionField) annotations that include the field renamed by the standard refactoring
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 NetBeans 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

Other Plugin Components
Editor
A special multi-tab editor is available when a java class in Roma Projects is open.
The multi-tab editor comprehends up to four tab:
Java: the standard java source editor

XML: is the tab that shows the xml annotations eventually present in java class files

Persistence: is the tab that shows the packaje.jdo file

I18N: is the tab that shows class internationalization

it is possible to add and remove entries on the I18N files present on a Roma Project
Add Locale button can add a language in the internationalization adding a column on the I18N tab
to remove a columns it is enough to delete de correspondent file in the Roma Project
Romulus Hierarchy
This feature permits to have an overview of the classes that are implemented with the pattern Extension-By-Composition.
The view is integrated on the default Netbeans Navigator.
The Extension-By-Composition navigator shows all the classes that are related to the domain class that comprehends the pattern and also the classes of the CRUD.

Get and Install
In order to implements application with Roma Framework plugin for Netbeans you must have:
Java 6 JDK
Apache Ant
Netbeans 6.5.1 IDE
Roma Framework 2.0
Get sources
Download the source code from the svn repository of Romulus Project:
https://ict-romulus.svn.sourceforge.net/svnroot/ict-romulus/trunk/IDE-Plugins/NetbeansPlugin/
To download source code:
Open a shell and go to the path where you want to download the sources
Type:
svn co https://ict-romulus.svn.sourceforge.net/svnroot/ict-romulus/trunk/IDE-Plugins/NetbeansPlugin/
Before the compilation
To achieve a correct build of the plugin, follow the steps:
Go to
[NetbeansPluginDirectory]/NetbeansPlugin/nbproject/private/platform-private.properties
Open the file and make sure the path is correct, according with your operating system (win/linux)
Compile it all
Follow this steps:
Change current directory to the NetbeansPlugin directory and execute:
ant nbms
Wait for building and when finished you will find the nbm files in the directory
[NetbeansPlugin]/build/updates
The binary distributions for IDE4Romulus are available on line in the the SVN (subversion) repository for Romulus Project.
Open Netbeans IDE. Go to Tools->Plugins. On the Downloaded tab, click on the AddPlugins button and add the generated nbm files for the plugin.
Click on the Intall button
After the installation you should see the new plugin installed in the list showed on the Intalled tab