Transcript
Page 1: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

Tools and Methodologies for GMF

Aurélien Pupier R&D Engineer, Studio Project Leader

GMF-Runtime Committer @apupier

EclipseDay Delft , September 27, 2012

Page 2: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 2

Agenda

Show me a GMF editor

GMF Big Picture

Methodologies

Tooling

Page 3: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 3

GMF BIG PICTURE

Page 4: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 4

GMF

Page 5: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 5

GMF Basic Workflow

Semantic Model (ecore)

Diagram Model

GMF codegen

Diagram code

Mapping

Code generation

Page 6: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 6

What happens after the first generation?

Requirements update

Introduce specific behavior

I’m not able to do a one shot!

Page 7: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 7

METHODOLOGIES

Page 8: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 8

Update the model!

Straightforward

Best maintainability

Easiest solution

Page 9: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 9

GMF Extension points

24

Classical Eclipse way

Page 10: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 10

Extension points – Typical pattern

Custom Diagram PLUG-IN

CustomXXXEditPartProvider CustomXXXEditPart

GENERATED Diagram PLUG-IN

extends extends

XXXEditPartProvider XXXEditPart

Reference

Reference

Page 11: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 11

Generation templates

When?

Apply to a whole kind of elements

Ultimately

Useful for:

Regeneration

New element introduced

Page 12: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 12

Generation aspect templates

Reduce amount of code to maintain

Avoid code duplication

Down grain from class to method

Page 13: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 13

Generation aspect templates

.xpt

Page 14: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 14

Another tip to reduce size of custom generation templates?

Page 15: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 15

Utility plugin – why?

Page 16: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 16

Utility plugin – how?

Page 17: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 17

Modify Generated code

@Generated NOT

Sandbox

Page 18: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 18

Projects Structure (1/2)

Page 19: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 19

Projects Structure (2/2)

Generation Templates

Semantic Model

Diagram Model

Page 20: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 20

GMF Workflow Semantic

Model (ecore)

Diagram Model

GMF codegen

Diagram code

Mapping

Code generation

Extension points

Aspect Template

Utility plugin

Model

Model

Page 21: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

TOOLING

Page 22: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 22

GMF-Tooling

Official tooling of GMF

● Several editors

● Wizards

● GMF Dashboard

Page 23: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 23

SWTBot4GEF

Automated UI tests

Simple API:

click

drag

select

activateTool

Page 24: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 24

Code generation Ant Task

Generate code at build time

Avoid reconcilier issues

Avoid modification of your sandbox commited

Page 25: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 25

OCL Editor and Interpreter

Write and Test constraints

Page 26: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 26

Simple Mapping Editor (1/2)

Page 27: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 27

Simple Mapping Editor (2/2)

All-in-one editor

Keep separation of concerns available

Eating your own dog food

Page 28: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 28

EDapt

Big underlying model modifications

PoC for BOS 6.0

Page 29: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 29

Keep in mind

Great tooling ecosystem

Proven methodologies for continuous improvement

Page 30: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

9/29/2012 www.bonitasoft.com | © BonitaSoft S.A. 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

Page 31: Tools and Methodologies to leverage GMF power (EclipseDay Delft 2012)

[email protected]

Twitter: @apupier

Eclipse blog: www.bonitasoft.org/blog/category/eclipse

Talk to me about Bonita, BPMN2, Eclipse Modeling and more

Company: www.bonitasoft.com

Community: www.bonitasoft.org

Twitter: @bonitasoft


Top Related