Upload
lcodrutlucian
View
109
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Integrating Alf Editor with Eclipse UML Editors
Citation preview
Integrating Alf Editor with Eclipse
UML Editors
Lazăr Codruț Lucian
Babeș-Bolyai University, Cluj-Napoca, Romania
Contents
Introduction
fUML (Executable Foundational UML)
Alf (Action Language for fUML)
Eclipse Editors
UML Editors
Xtext Editors
Editors Integration
Future Work
Foundational Executable UML (fUML)
fUML Specification
Object Management Group (OMG) Standard
2011, version 1.0
http://www.omg.org/spec/FUML/
a computationally complete and compact subset of UML
provides a simplified subset of UML Action Semantics package
simplifies the context to which the actions may be applied
enforces a data flow abstract representation
fUML Reference Implementation
ModelDriven.org
2011, version 0.4.1
executes fUML models
Action Language for fUML (Alf)
Alf Specification
Object Management Group (OMG) Standard
2010, version 1.0-Beta1
http://www.omg.org/spec/ALF/
a textual surface representation for UML modeling
elements
execution semantics: Alf concrete syntax is mapped to the
abstract syntax of fUML
UML Editors
Eclipse UML2 project
EMF-based implementation of UML metamodel
XMI schema
persistence in .uml files
tree based editor
Eclipse MDT/UML2Tools project
UML Diagrams
based on Eclipse GMF (Graphical Modeling Framework)
not supported since 2009
Eclipse MDT/Papyrus
UML and SysML Diagrams
Xtext Editors
Eclipse Xtext project
a framework/tool for development of external textual DSLs
simple EBNF grammar language
generates / reuses EMF meta-models
generates a full-featured Eclipse Text Editor
Xtext Editors (2)
custom fUML based Action Language
part of ComDeValCo project
similar to Alf
editor based on Xtext
Xtext Editors (3)
The custom AL editor generates
the structure of UML elements
and fills in the elements not covered
by the Xtext grammar
Editors Integration - introduction
Each editor works with its own editing domain and resources
Xtext editor replaces the model at a frequent rate
Synchronization is performed on Save operations
Editors Integration – introduction (2)
Each resource persists its own root model element
By default, each element is contained in the same resource as
its owner
Cross-resource containment relation is established for the
element we want to persist with a different resource
Editors Integration – initial steps
Editing starts with an empty Activity
With an action (bound to a key):
- a Comment will be created
- an “ealf” resource is loaded
(related to the comment)
- the Activity’s resource is changed
to the new “ealf” resource)
- the Activity is serialized
Editors Integration – initial steps (2)
The Activity’s reference contains the ID of the Comment
The Xtext editor is loaded with the custom “ealf” resource.
It can be reloaded if the workbench is restarted.
Editors Integration – tree editing
Elements can be added in the
tree editor to the Activity.
The Activity with the new
Variable will be serialized
in the resource’s Comment.
The updated Activity is
visible in the textual editor.
Editors Integration – textual editing
The new text added in the
textual editor is reparsed.
On save action, it will be
serialized in the Comment.
The text Parser recreates the whole model, so the new root Activity needs
to be reconnected to the previous container element form the UML resource.
The tree editor’s main
UMLResource will notice
that the file has changed
and will perform a refresh
Future Work
update the custom editor (that uses our fUML based
Action Language) to function with the new Eclipse
Modeling Framework plugins
integrate the editor with the UML tree editor
integrate the editor with a Diagram editor (Papyrus or a
new custom editor based on Eclipse GMF)
Thank you!