Introduction to the Graphical Modeling Framework Artem Tikhomirov

  • Slides: 25
Download presentation
Introduction to the Graphical Modeling Framework Artem Tikhomirov, Borland Alexander Shatalin, Borland © 2008

Introduction to the Graphical Modeling Framework Artem Tikhomirov, Borland Alexander Shatalin, Borland © 2008 by Borland Software Corp; made available under the EPL v 1. 0 | 17 March 2008

GMF Overview • “The Eclipse Graphical Modeling Framework (GMF) provides a generative component and

GMF Overview • “The Eclipse Graphical Modeling Framework (GMF) provides a generative component and runtime infrastructure for developing graphical editors based on EMF and GEF. ” • Significantly reduces cost of DSL tooling • GMF is part of Eclipse Modeling Project • GMF-generated solutions proved by: w. ecore diagram editor w. gmfgraph bootstrapping editor w UML 2 Tools project diagram editors w Borland Together DSL toolkit Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Agenda • • Define requirements for diagram editor Building diagram editor with GMF, basic

Agenda • • Define requirements for diagram editor Building diagram editor with GMF, basic steps Live demo Hands on – try building your version of GMF diagram GMF architecture Q&A session Generated diagram extensibility Additions Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Define requirements for diagram editor Router Sub. Net Workstation Introduction to the Graphical Modeling

Define requirements for diagram editor Router Sub. Net Workstation Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Building diagram editor with GMF, basic steps • Design EMF domain meta-model • Create

Building diagram editor with GMF, basic steps • Design EMF domain meta-model • Create graphical representations for diagram nodes/links • Define diagram structure and generate code ? Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

EMF domain meta-model Introduction to the Graphical Modeling Framework | © 2008 by Borland

EMF domain meta-model Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Graphical elements • SVG picture • Draw 2 d “matryoshka” • Composite SVG figure

Graphical elements • SVG picture • Draw 2 d “matryoshka” • Composite SVG figure Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Define diagram structure and generate code Domain model ? Java code M 2 T

Define diagram structure and generate code Domain model ? Java code M 2 T M 2 M Graphical shapes Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Live demo Introduction to the Graphical Modeling Framework | © 2008 by Borland Software

Live demo Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Hands on/Q&A session Try building your version of GMF diagram Introduction to the Graphical

Hands on/Q&A session Try building your version of GMF diagram Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

GMF architecture: GMF Tooling • Set of models to define diagram editor - capturing

GMF architecture: GMF Tooling • Set of models to define diagram editor - capturing graphical, tooling and meta-modeling aspects. • Extensible code generator, capable to customize generated code to match specific requirements Transformation Templates Domain Model (ECore) Generator Model (GMFGen) Java code Mapping (GMFMap) Graphical Definition (GMFGraph) Tool Definition (GMFTool) Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Models: Domain. What is meta-model? A dog sits in a car. A girl reads

Models: Domain. What is meta-model? A dog sits in a car. A girl reads a green book. … UML EMF Java API Instance level XSD … Meta-level Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Models: Graphical Definition Figures Shapes Introduction to the Graphical Modeling Framework | © 2008

Models: Graphical Definition Figures Shapes Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Models: Graphical Definition Diagram Elements Introduction to the Graphical Modeling Framework | © 2008

Models: Graphical Definition Diagram Elements Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Models: Tooling § Palette tools § Context menu actions § Property sheet Introduction to

Models: Tooling § Palette tools § Context menu actions § Property sheet Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Models: Mapping Graphical Definition Domain model Mapping model Tool Definition Introduction to the Graphical

Models: Mapping Graphical Definition Domain model Mapping model Tool Definition Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

M 2 T Models: Generation M 2 M Introduction to the Graphical Modeling Framework

M 2 T Models: Generation M 2 M Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

GMF architecture: Runtime component A set of plug-ins simplifying development of EMF-based diagram editor,

GMF architecture: Runtime component A set of plug-ins simplifying development of EMF-based diagram editor, with an execution time extensibility • Reusable components for graphical editors • Standardized model to describe visual properties of diagram elements • Set of Services extensible via declared extension-points at execution time • Command infrastructure that bridges EMF and GEF Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Variation points Domain Model (ECore) Generator Model (GMFGen) Java code Mapping (GMFMap) Graphical Definition

Variation points Domain Model (ECore) Generator Model (GMFGen) Java code Mapping (GMFMap) Graphical Definition (GMFGraph) Tool Definition (GMFTool) Templates Transformation Extension Code Models points Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Additions Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp;

Additions Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Runtime - Lite • Lightweight alternative to Full Runtime • Notation Model to represent

Runtime - Lite • Lightweight alternative to Full Runtime • Notation Model to represent diagram • Experimental option • Targets pure GEF • Easy to understand w nothing but EMF and GEF Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Notation Model Introduction to the Graphical Modeling Framework | © 2008 by Borland Software

Notation Model Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Visual model: Styled text representation A dog sits in a car. <sentence. Representation sentence="s.

Visual model: Styled text representation A dog sits in a car. <sentence. Representation sentence="s. xmi#//@sentence"> <word. Representations word="s. xmi#//@sentence/@words. 0"/> <word. Representations word="s. xmi#//@sentence/@words. 1"> <color red=“ 255“ blue=“ 0” green=“ 0”/> </word. Representations> <word. Representations word="s. xmi#//@sentence/@words. 2"/> <word. Representations word="s. xmi#//@sentence/@words. 3"/> <word. Representations word="s. xmi#//@sentence/@words. 4"/> <word. Representations word="s. xmi#//@sentence/@words. 5" bold="true"/> </sentence. Representation> Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Visual model: Styled text representation A dog sits in a car. Introduction to the

Visual model: Styled text representation A dog sits in a car. Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0

Thank you for your attention. • www. eclipse. org/gmf Introduction to the Graphical Modeling

Thank you for your attention. • www. eclipse. org/gmf Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v 1. 0