Upload
trinhthuy
View
232
Download
1
Embed Size (px)
Citation preview
Integration of textual and graphical editors in Eclipse (Mid-term presentation)
Edin Dudojević Supervision: • Mark van den Brand (TU/e) • Arjan Mooij (ESI)
Presentation overview
• Introduction • Integration requirements • Available technology
• Partial-model editing
• Graphically • Textually
• Questions
/ Department of Computer Science PAGE 1 19-2-2014
Introduction SHESim
/ Department of Computer Science PAGE 2 19-2-2014
SHESim Editor
Need for this master project as a result from work of Zlatka Manevska: • re-design SHESim, improve usability and user experience • Migrate to the Eclipse platform • Use both graphical and textual editors for models
• Integration of graphical and textual editor no success
Eclipse
Focus in my project is not on SHESim but on the problem in general
Introduction Problem
When creating models we usually also want to view and edit them in some way:
• View: a representation of (a part) of the model − Textual, graphical, tree-view, ..
• Editor: a view that allows us to manipulate and save our model
/ Department of Computer Science PAGE 3 19-2-2014
Introduction Problem
Models tend to get big • Use high-level (layered) or partial model views • Show only relevant parts of model
But we want more • Multiple editors on the same (partial) model • Both textually and graphically
We need full synchronization! • Propagation of changes to all views
/ Department of Computer Science PAGE 4 19-2-2014
Introduction Problem statement
We want to be able to edit our model from multiple editors, both textually and graphically, while keeping everything synchronized, independent of the model language being used. Questions: • How can this be done in a systematic and generic way? • Are there any patterns that we can identify?
/ Department of Computer Science PAGE 5 19-2-2014
Integration requirements
Use cases: • SLCO and POOSL languages
High-level integration requirements • Hierarchical views • Propagation of changes − Adding/removing elements − Dealing with references
/ Department of Computer Science PAGE 6 19-2-2014
Frameworks for textual editors • Xtext, EMFText Frameworks for graphical editors • GMF/EuGENia, Graphiti/Spray..
Available technology
A lot of technologies available, which ones to use?
/ Department of Computer Science PAGE 7 19-2-2014
Low-level Intermediate level
High level { { {
Available technology
/ Department of Computer Science PAGE 8 19-2-2014
Easy choice: Xtext and GMF! • Most widely used • Large communities • Good documentation
(relatively)
But what do Xtext and GMF provide out of the box?
Available technology (cntd.)
Xtext – GMF synchronization
Greetings DEMO
PAGE 9 19-2-2014 / Department of Computer Science
Available technology (cntd.)
• Xtext – GMF synchronization DEMO
/ name of department PAGE 10 19-2-2014
greetings.mydsl greetings.mydsl_diagram
Xtext editor
….. <element xmi:type="myDsl:Greeting" href="greetings.mydsl#//@greetings.0"/> ….
GMF editor
Hello Earth!
Hello Earth! Earth
Available technology (cntd.)
• Xtext – GMF synchronization DEMO
/ name of department PAGE 11
greetings.mydsl greetings.mydsl_diagram ….. <element xmi:type="myDsl:Greeting" href="greetings.mydsl#//@greetings.0"/> ….
Hello Earth!
Meta-model
19-2-2014
Available technology (cntd.)
• Xtext – GMF synchronization DEMO
PAGE 12 19-2-2014
These are synchronizations on entire models
How about partial-model editing?
/ Department of Computer Science
Partial-model editing
/ Department of Computer Science PAGE 13 19-2-2014
ecore
genmodel
HL.gmfgraph Sub.gmfgraph
HL.gmftool
HL.gmfmap
HL.gmftool
Sub.gmfmap
/ Department of Computer Science PAGE 14 19-2-2014
HL.gmfgen Sub.gmfgen
We can even create recursive sub-diagrams (i.e. folders and files on an OS)
Partial-model editing GMF sub-diagrams
Partial-model editing GMF sub-diagrams
/ Department of Computer Science
Web application DEMO
Partial-model editing GMF sub-diagrams
/ Department of Computer Science
high-level model editor Meta-model
A B
Partial-model editing GMF sub-diagrams
/ Department of Computer Science
Meta-model
A
x
y
B
z
sub-diagram model-editor
high-level model editor
Partial-model editing
/ Department of Computer Science
✓
Partial-model editing Xtext
Can we simply do the same thing with Xtext?
/ Department of Computer Science PAGE 19 19-2-2014
• Unfortunately, no. (no out-of-the-box feature to do this) • There are a couple of significant issues:
1. Xtext usually only works with physical files − Should we create separate files for sub-models? − Separate Xtext editors, similar to the GMF approach?
2. Xtext+GMF on same semantical in-memory model = problem − A separate in-memory resource for an Xtext instantiation?
This is still a work in progress
Partial-model editing Xtext
Other things to keep in mind
/ Department of Computer Science PAGE 20 19-2-2014
• Where do we instantiate the Xtext editor? • Adapt the default code or can we extend it? • Performance issues? • Maintenance of code • Future-proofness − To some point resistant to Xtext/GMF/Eclipse changes − Small changes to meta-model should not be a problem
Partial-model editing Xtext
/ Department of Computer Science PAGE 21 19-2-2014
What have others done? • Multiple repositories with proof-of-concept code
− Old versions of Xtext/Eclipse/EMF/etc. (period of 2009-2011) − No documentation
• Multiple eclipse-based tools with embedded editors − MPS (DSL development environment) − Yakindu Statecharts Tools (seems most promising approach a.t.m.) − Evolve (architecture modeling) − etc.
Summary
• Graphical model navigation (GMF) • ☑ Graphical partial models in new tabs
• Textual model navigation (Xtext)
• ☑ In-diagram embedded label editor • ☐ In-diagram embedded sub-tree editor • ☐ Textual partial models in new tabs
/ Department of Computer Science PAGE 22 19-2-2014
Questions?
? / Department of Computer Science PAGE 23 19-2-2014