Java Reference
In-Depth Information
complexity associated with developing and maintaining the other Model-Driven
Software Development (MDSD) artifacts? In general, the more complex the
metamodel (DSL) is, the more complex the transformation definitions, templates,
and diagram definitions are.
A set of conventions and best practices for the definition of DSLs, transfor-
mations, and templates likely will arise, as it has for Java and other popular pro-
gramming languages. With conventions and best practices comes tooling to
support refactorings, static analysis, and cleanup. At this stage of the Modeling
project's evolution, operations are still quite manual and even error prone. As an
open source project that forms the basis for commercial products, Eclipse even-
tually will see more advanced features pushed down into it, thereby improving
the Toolsmith experience.
3.2 Eclipse Modeling Framework
From the project description, EMF is “a modeling framework and code genera-
tion facility for building tools and other applications based on a structured data
model.” This pretty much sums it up, but there's a lot to know about EMF. I
highly recommend that you first read, or at least have available, the topic on
EMF [38] to better understand its use in the context of this topic. Alternatively,
reading through the online documentation and tutorials on EMF should make its
use in this topic easy to follow. In other words, the examples in this topic only
scratch the surface of what is possible using EMF.
You can create models using EMF in many ways. You can use the provided
editor (a tree with properties view) or import a set of annotated Java classes. An
Ecore diagram is available from the EMFT project. If you have the XSD compo-
nent installed, you can import an XSD file. If you have the Unified Modeling
Language (UML) version 2 (UML2) component installed, you can import a
UML2 model. If you have Graphical Modeling Framework (GMF) installed, you
can use its example Ecore diagram editor. If you download and install Emfatic
[42], you can work in a textual syntax and synchronize with your Ecore model.
In the future, you will be able to design your own concrete textual syntax for
Ecore, or any model, using the Textual Modeling Framework (TMF) project.
Regardless of the method you choose for importing or working with your
domain model, you will find an .ecore file in your workspace—that is, unless
you take a purely programmatic approach. If you open this file in a text editor,
you will see that it is an XML Metadata Interchange (XMI) serialization of your
Ecore-based model. By default, EMF enables you to edit models in a basic (gen-
erated) tree editor with a Properties view. You can easily generate a similar edi-
tor for your own model.
Before getting into more detail, let's take a look at the Ecore metamodel.
 
Search WWH ::




Custom Search