This content applies to version
7.5.1 or later. The Rational® Software Architect
RealTime Edition UML
RT software development kit (SDK) is based on and extends several
underlying technologies and services. In many cases client code calls
those services directly.
The UML RT SDK is based on and extends these technologies and services:
Note: The
application programming interfaces (APIs) in the Rational UML modeling products are based
on Eclipse version 3.4 and the latest compatible versions of Eclipse
Modeling Framework (EMF) and Graphical Editing Framework (GEF). Also,
the Eclipse UML2 API was modified to match the final UML2 2.1 specification.
- Eclipse Plug-in Development Environment (PDE): The client code
must be implemented as an Eclipse plug-in. For more information about
plug-in development and the PDE, see "Platform Plug-in Developer Guide"
topic and "PDE Guide" in the online help. On the Eclipse.org Web
page, see http://www.eclipse.org/pde/.
- UML2: Because capsule-based modeling is an extension of UML2
modeling, the UML2 API is the primary way to access the model. For
more information about the UML2 API, see http://www.eclipse.org/modeling/mdt/?project=uml2.
- Eclipse Modeling Framework (EMF) Transactional Service: Because
the UML RT SDK client code shares the models with the UML Modeler
API, which accesses the models in transactional mode, the UML RT SDK
client code also uses transactional mode. The transactional mode helps
manage exceptions, and can perform Undo and Redo actions automatically.
The client is responsible for read/write transactions when accessing
the models for reading or writing. For more information about the
EMF Transactional Service, see http://www.eclipse.org/modeling/emf/?project=transaction.
- Eclipse Graphical Modeling Framework (GMF): The presentation layer
of capsule-based modeling is based on GMF services. The GMF API is
used to access diagrams, the Project Explorer view, the Properties
view, and other views. For more information, see the Graphical Modeling
Framework (GMF) Web page or the Graphical Editing Framework (GEF)
Web page at http://www.eclipse.org.
- UML Modeler: The capsule-based modeling tools are extensions of
the UML modeling framework, and the client code for the UML RT SDK
uses the UML Modeler API to perform common API tasks. For more information
about the UML Modeler API, see the online help.
You can use the following UML RT SDK APIs:
Redefinition API
Provides a set of wrappers
that represent UML Redefinable Elements that are accessed in a particular
redefinition context.
For more information about the UML2 Redefinable Element and
Redefinition Context API, see the UML2 specification. RT Redefinition
wrappers, such as the RTTransitionRedefinition class, make UML Redefinition
wrappers subclasses (TransitionRedefinition in this case), and add
RT-specific traits to them. The RT-specific traits are usually implemented
as UML-stereotype-based extensions.
- When the Redefinition API returns a UML Redefinition wrapper and
an RT Redefinition wrapper is expected, you can use the instanceof operator
and cast to the corresponding RT Redefinition Wrapper.
- When the same property of a Redefinable Element is available through
both the UML2 API and the Redefinition API, you must always use the
latter.
For example, to access the type property of a port element, you
can use the UML2 TypedElement#getType() API or the PropertyRedefinition#getType()
API, but only the latter returns the correct type; because, unlike
the UML2 API, it takes Redefinition into account. For more information
about using the Redefinition API, see the source code for the UML
RT SDK example.
Property Sets API
Provides access to the
element attributes that are available in the Properties view, on the RT
Properties page. For more information about using the
Property Sets API, see the source code for the UML RT SDK example.
Protocol API
Encapsulates several UML elements
that represent an RT Protocol entity. The RTProtocol interface represents
the RT Protocol entity in the API. You can use the RTFactory.ProtocolFactory
class to create new RT Protocol Elements. For more information about
protocols, see the source code for the UML RT SDK example.
Model Operations API
The client code for
the UML RT SDK should use the Model Operations API for several model
operations instead of the UML2 API. For example, the client code should
use the Model Operations API to create elements, delete elements,
reorient element relationships, and so on.
- Element creation: Use the RTModelOperations#createElement method
to create elements. To find the correct element type used in the argument
list of the createElement method, check first in the UMLRTElementTypes
enumerator and then in the com.ibm.xtools.uml.core.type.UMLElementTypes
enumerator.
- Other operations: Always use the RTModelOperations class to perform
the associated model operations. Using this class guarantees that
the framework properly completes the extra work that is associated
with the operation. For more information about using the Model Operations
API, see the source code for the UML RT SDK example.