This Developer Guide helps developers of the Mod4j project to get started with coding and modeling. If you are an user of Mod4j you should follow the Getting Started from the user docs. See menu > User Docs > Getting Started.
| Eclise plug-in | Features to select when installing | Update site |
|---|---|---|
| Eclipse Xtext and Xpand plug-ins | - TMF XTEXT SDK (Incubation) 0.7.2 - M2T XPAND SDK (Incubation) 0.7.2 - MWE SDK (Incubation) 0.7.2 |
http://download.eclipse.org/releases/galileo |
| Eclipse Xtext Antlr plug-ins | - Xtext Antlr Support 0.7.2 | http://download.itemis.com/updates/releases |
| Eclipse Maven plug-in: m2eclipse | - Maven Integration for Eclipse 0.12.1 or higher | http://m2eclipse.sonatype.org/sites/m2e |
| Ecore Tools. (For graphical modeling of our meta-models) | Choose Modeling and then Ecore Tools SDK | Helios - http://download.eclipse.org/releases/helios |
| Subclipse, plug-in for integration with Subversion | Select all features | http://subclipse.tigris.org/update_1.6.x |
smartjava_eclipse_formatter.xml here
.
smartjava_eclipse_formatter.xml
.
While the metamodel and its associated syntax is still under development, you should be prepared to generate the model editors yourself from the metamodel and the syntax definitions, before you can start modeling:
Hybrids
Important to know is, that the Mod4j modules that you are going to checkout from the repository,
do have a
hybrid nature. Some of the modules are Eclipse plug-ins and some are Maven modules. But the most
modules are
both: Eclipse plug-in and configured as a Maven module (yes, you can recognize them by the
pom.xml file).
This last category, the hybrids, must be treated with extra care. It mainly implies that you as a developer
must know that dependencies must be manually managed in two places within the module. In the manifest
(Eclipse plug-in) and in the pom.xml file (Maven) of the module. Also, in an equal manner, the versions of
the module must be maintained manually twice.
At the moment we do not have a suitable solution for automating this process, maybe in the future we will
extend our mod4j-maven-plugin with this functionality or see if the maven-eclipse-plugin can help us out.
mod4j
project from the Subversion URL
https://svn.codehaus.org/mod4j/trunk
into a directory on your file system. See the link
Project information
for information on how to do this.
../modules/Crossx
folder. After choosing
Ok
and
Finish
the following modules are imported in your workspace:
org.mod4j.crossx.mmorg.mod4j.crossx.brokermodules/org.mod4j.common
and
modules/org.mod4j.updatesite
and
modules/Eclipse/org.mod4j.eclipse../modules/BusinessDomainDsl
folder. After choosing
Ok
and
Finish
the following modules are imported in your workspace:
org.mod4j.dsl.businessdomain.generatororg.mod4j.dsl.businessdomain.mmorg.mod4j.dsl.businessdomain.validationorg.mod4j.dsl.businessdomain.xtextorg.mod4j.dsl.businessdomain.xtext.uiorg.mod4j.dsl.businessdomain.mm/model/BusinessDomainDsl.genmodel
in the EMF Generator editor.
BusinessDomainDsl
in the editor pane, and choose
Generate Model Code
org.mod4j.dsl.businessdomain.xtext/src/org.mod4j.dsl.businessdomain.xtext/GenerateBusinessdomain.mwe,
and choose
Run As -> MWE Workflowfrom the context-menu.
../modules/DataContractDsl
and
../modules/ServiceDslmodules/org.mod4j.runtime.common
folder. Then choose
Ok
and
Finish
.
modules/org.mod4j.mavenpluginNow you have imported and generated the necessary modules. The DSL editors are ready to use. There for you need to activate the newly created editor in a second Eclipse instance. See next section "Modeling".
-Xms512m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=512m
-Dcom.sun.management.jmxremote
org.mod4j.dsl.businessdomain.xtext.ui
and choose
Run As -> Eclipse Applicationfrom the context menu.
../modules/Examples/RecordShop-ExampleProject/RecordShop-dslModels
folder.
After choosing
Ok
and
Finish
the following modules are imported in your workspace:
RecordShop-dslModels../modules/Examples/RecordShop-ExampleProject
folder. Then choose
OkRecordShop-domainRecordShop-dataRecordShop-businessRecordShop-serviceRecordShop-dslModels
project.
RecordShop-dslModels/src/model/businessDomain/businessDomain/model.busmod
change this file as needed and save the file.
../RecordShop-ExampleProject/RecordShop-domain
and
../RecordShop-ExampleProject/RecordShop-datamvn clean installAs a new developer of Mod4j you will need to follow the next steps