This section outlines the architecture of the Taylor MDA tool plus the generated target architectures.
Taylor leverages several Eclipse components to achieve this:
- The Eclipse UML model is used as the XMI file format for the PIM.
- The Eclipse Graphical Modeling Framework (GMF) is the platform for the notation editor.
- And Eclipse Java Emitter Templates (JET) are used to transaform the PIM into the PSM.
- Newer, fancier options are available to, but JET works well, so there is no reason to rewrite 100+ templates...
It leverages other open-source tools like:
- Maven for builds and documentation generation
- JUnit and the JBoss Embeddable EJB3 container for unit testing
- JBoss Seam for simplified creation of Java Server Faces (JSF) based apps
- JBoss Server et al
- And more...
Extending Taylor only requires an understanding of
- the Eclipse plug-in architecture
- and a couple of customer extension points.
- The net.taylor.mda.navigator plug-in provides
- the Taylor Perspective
- the Model Navigator Tree View
- the Tabbed Properties
- and various right-click menu actions
- The net.taylor.uml2.uml.edit plug-in
- was generated by EMF from the UML2 metamodel
- and was customized with different icons and menu options
- The net.taylor.uml2.editor plug-in provides
- the new model wizard
- and applies profiles to a new model based on the profile extension point
- The net.taylor.mda.generator plug-in provides
- the engine to run templates based on the template extension point
- the Preferences view to override templates
- the Generate menu actions
The diagram plugins are self explanatory. They were developed using GMF.
Templates are deployed as plugins. A group of templates constitutes a target architecture. For example, the template plugins listed below are used to generate JEE code. By swapping these out for another set you could generate something totally different from the same model.
- JEE Target Architecture
For more information on these plugins see Writing Custom Generators.
The net.taylor.mda.profiles plugin contains various profiles and stereotypes.
For different target architectures you may want a different set of profiles.
Profiles are registered using the profile extension point. The New Model Wizard uses this extension point to determine which profiles to apply.
This link contains good info how to create your own stereotypes. http://www.ibm.com/developerworks/rational/library/05/0906_dusko/
- The net.taylor.mda.reverse plugin provides
- various import wizards
- and several base classes.
Utilities are simply things that you do the same way over and over again. So it is nice to extend the tool with shortcuts.
Utilities such as the Add Primary Key and Apply CRUD Pattern menu options can be added by simply adding a new plugin. These two examples are implemented in the net.taylor.mda.jpagen and net.taylor.mda.ejb3gen plugin. This is just good old Eclipse plugin development.
Building the Plug-ins
- Start by creating a dedicated workspace.
- Then checkout the plug-ins from SVN.
- To build the plug-ins right-click on the net.taylor.mda project and select Export>Plug-in Development>Deployable features
- Specify a Destination Directory, such as C:\workspaces\build, and press Finish
- Copy the features and plugins directories from your build directory to your eclipse directory
- Restart Eclipse with the -clean option
Testing the Plug-ins
- Follow the steps above to checkout the plug-in projects
- Select the net.taylor.mda project
- Go to Run>Run As>Eclipse Application or Run>Debug As>Eclipse Application
- Install the SDKs for GMF and its dependencies for debugging
- Dependency Injection
- AOP Interceptors
- Drools aka JBoss Rules
- Seam + SFSB
- Feel free to contribute!