16
Integrating Alf Editor with Eclipse UML Editors Lazăr Codruț Lucian Babeș-Bolyai University, Cluj-Napoca, Romania

Integrating Alf Editor With Eclipse UML Editors

Embed Size (px)

DESCRIPTION

Integrating Alf Editor with Eclipse UML Editors

Citation preview

Page 1: Integrating Alf Editor With Eclipse UML Editors

Integrating Alf Editor with Eclipse

UML Editors

Lazăr Codruț Lucian

Babeș-Bolyai University, Cluj-Napoca, Romania

Page 2: Integrating Alf Editor With Eclipse UML Editors

Contents

Introduction

fUML (Executable Foundational UML)

Alf (Action Language for fUML)

Eclipse Editors

UML Editors

Xtext Editors

Editors Integration

Future Work

Page 3: Integrating Alf Editor With Eclipse UML Editors

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

Page 4: Integrating Alf Editor With Eclipse UML Editors

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

Page 5: Integrating Alf Editor With Eclipse UML Editors

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

Page 6: Integrating Alf Editor With Eclipse UML Editors

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

Page 7: Integrating Alf Editor With Eclipse UML Editors

Xtext Editors (2)

custom fUML based Action Language

part of ComDeValCo project

similar to Alf

editor based on Xtext

Page 8: Integrating Alf Editor With Eclipse UML Editors

Xtext Editors (3)

The custom AL editor generates

the structure of UML elements

and fills in the elements not covered

by the Xtext grammar

Page 9: Integrating Alf Editor With Eclipse UML Editors

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

Page 10: Integrating Alf Editor With Eclipse UML Editors

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

Page 11: Integrating Alf Editor With Eclipse UML Editors

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

Page 12: Integrating Alf Editor With Eclipse UML Editors

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.

Page 13: Integrating Alf Editor With Eclipse UML Editors

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.

Page 14: Integrating Alf Editor With Eclipse UML Editors

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

Page 15: Integrating Alf Editor With Eclipse UML Editors

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)

Page 16: Integrating Alf Editor With Eclipse UML Editors

Thank you!