More Related Content Similar to Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012) (20) More from Aurélien Pupier (12) Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)1. Tools and Methodologies for GMF
Aurélien Pupier
R&D Engineer, Studio Project Leader
GMF-Runtime Committer
@apupier
EclipseDay Delft , September 27, 2012
2. Agenda
Show me a GMF editor
GMF Big Picture
Methodologies
Tooling
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
2
5. GMF Basic Workflow
Semantic Diagram
Model (ecore) Model
Mapping
GMF codegen
Code generation
Diagram code
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
5
6. What happens after the first
generation?
Requirements update
Introduce specific behavior
I’m not able to do a one shot!
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
6
7. METHODOLOGIES
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
7
10. Extension points – Typical pattern
GENERATED Diagram PLUG-IN
XXXEditPartProvider Reference XXXEditPart
extends extends
Custom Diagram PLUG-IN
CustomXXXEditPartProvider Reference CustomXXXEditPart
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
10
11. Generation templates
When?
Apply to a whole kind of elements
Ultimately
Useful for:
Regeneration
New element introduced
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
11
12. Generation aspect templates
Reduce amount of code to maintain
Avoid code duplication
Down grain from class to method
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
12
14. Another tip to reduce size of
custom generation templates?
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
14
19. Projects Structure (2/2)
Generation Templates
Semantic Model
Diagram Model
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
19
20. GMF Workflow
Semantic Diagram Model
Model (ecore) Model
Model
Mapping
Utility plugin
GMF codegen
Code generation Aspect Template
Diagram code
Extension points
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
20
24. Code generation Ant Task
Generate code at build time
Avoid reconcilier issues
Avoid modification of your sandbox commited
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
24
25. OCL Editor and Interpreter
Write and Test constraints
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
25
27. Simple Mapping Editor (2/2)
All-in-one editor
Keep separation of concerns available
Eating your own dog food
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
27
29. Keep in mind
Great tooling ecosystem
Proven methodologies for continuous
improvement
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
29
30. To go further
Eclipse GMF Forum:
http://www.eclipse.org/forums/index.php/f/16/
Eclipse GMF Wiki:
http://wiki.eclipse.org/GMF
Talk together
9/29/2012 www.bonitasoft.com | © BonitaSoft S.A.
30