| Eclise plug-in | Features to select when installing | Update site |
|---|---|---|
| Eclipse Xtext and Xpand plug-ins | - Xtext Antlr Support 0.7.2 - TMF XTEXT SDK (Incubation) 0.7.2 - M2T XPAND SDK (Incubation) 0.7.2 |
http://download.itemis.com/updates/releases |
| Eclipse IAM (Integration for Apache Maven), formerly called Q4E | Select all features | http://q4e.googlecode.com/svn/trunk/updatesite-iam |
| Mod4j Eclipse plug-in | Select all features | http://mod4j.org/updatesite/3.5 |
If you've completed the installation steps above, you're ready for modeling...
You can create the following Mod4j models in your project:
BusinessDomain model
DataContract
model
Service model
Presentation
model -- NOT AVAILABLE YET
Before you start we want to bring our
RecordShop
example project to your
attention. This project contains a example of each of the Mod4j models above. So
if
you want to learn the syntax and structure of the models, take a look at the
RecordShop. The RecorodShop is
an example project that we maintain during our
development process. Features we implement in Mod4j are first
tested in the
RecordShop.
Here
you can find the
RecordShop sources
and model files.
File, New, Other, Mod4j, Mod4j Project.
path-to-your-projects/MyApplication/modulessrc/model/businessdomain/MyApplicaton.busmod
(the model file containing the elements of your businessdomain
model)
src/model/datacontract/MyApplication.dtcmod
(the model file containing the elements of your datacontract model)
src/model/service/MyApplication.sermod
(the model file containing the elements of your service model)
src/model/mod4j.properties
(the property file containing input parameters for code generation)
src/model/businessdomain/MyApplication.busmod
with the
BusinessDomain Model Editor
.
If you've completed and saved your model(s) as described in the previous section, the source code and resources for your application are automatically generated out of the model(s). Here below is described were you can find them and how to import them as projects into Eclipse. You can also find a overview and the location of the generated sources by opening the Mod4j "Generated Files" console. (Window > Show View > Other > Mod4j > Generated Files).
MyApplication.dslModels
folder. See:
../MyApplication-domain
and
../MyApplication-datagenerated-sources
and
generated-resources
folders. Sources in
MyApplication-domain/generated-sources
and
resources in
MyApplication-data/generated-resourcessrc/main/..
folders.
mvn clean installsrc/main/java, src/test/java, src/main/resources, generated-sources
and
generated-resources
to it.
There are several reasons to mention why a developer needs to manually add (re)sources to the generated (re)sources by Mod4j.
For these reasons with Mod4j you can use Extension Points. Extension Points are extends to the generated (re)sources and provide a place where developers manually can make additions to- or change the behavior of the system. Initially Mod4j generates Extension Points once if they do not exist already. So Extension Points will not be overwritten by the generator.
Typically Extension Points are placed under the
src
folder of a
module and needs to be added to the projects versioncontrol system.