Download presentation
Presentation is loading. Please wait.
Published byLogan Trafford Modified over 10 years ago
1
© 2008 by Borland Software Corp; made available under the EPL v1.0 | 17 March 2008 Introduction to the Graphical Modeling Framework Artem Tikhomirov, Borland Alexander Shatalin, Borland
2
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 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: .ecore diagram editor .gmfgraph bootstrapping editor UML2 Tools project diagram editors Borland Together DSL toolkit
3
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 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
4
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Define requirements for diagram editor Workstation Router SubNet
5
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 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 ?
6
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 EMF domain meta-model
7
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Graphical elements SVG picture Draw2d “matryoshka” Composite SVG figure
8
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Define diagram structure and generate code Java code Domain model ? M2M M2T Graphical shapes
9
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Live demo
10
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Hands on/Q&A session Try building your version of GMF diagram
11
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 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 Generator Model (GMFGen) Java code Mapping (GMFMap) Tool Definition (GMFTool) Graphical Definition (GMFGraph) Domain Model (ECore) TransformationTemplates
12
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Models: Domain. What is meta-model? UMLEMFXSD Java API A dog sits in a car. A girl reads a green book. … Instance levelMeta-level …
13
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Models: Graphical Definition Figures Shapes
14
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Models: Graphical Definition Diagram Elements
15
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Models: Tooling Palette tools Context menu actions Property sheet
16
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Models: Mapping Domain model Tool Definition Graphical Definition Mapping model
17
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Models: Generation M2T M2M
18
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 What is the GMF Runtime? A set of frameworks to help the development of Eclipse graphical editors: Reusable components for graphical editors A standardized model to describe diagram elements Semantic and diagram models are distinct Enables open and extensible graphical editors Command infrastructure that bridges EMF and GEF EMF provides a runtime infrastructure to instantiate and manipulate models (among other things) GEF is an MVC-based framework to create graphical editors Leverage various other technologies: EMFT: Transactions, Validation, OCL Apache Batik
19
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Reusable Components for Graphical Editors Action Bars: Collapsed Compartments: Connection Handles: Geometrical Shapes:
20
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Reusable Components for Graphical Editors Actions: Toolbar: Properties View:
21
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Reusable Components for Graphical Editors Page Setup: Print Preview: “Copy Diagram to Image File” formats: System clipboard formats:
22
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 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
23
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Variation points Generator Model (GMFGen) Java code Mapping (GMFMap) Tool Definition (GMFTool) Graphical Definition (GMFGraph) Domain Model (ECore) ModelsTransformationTemplatesExtension pointsCode
24
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Additions
25
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Runtime - Lite Lightweight alternative to Full Runtime Notation Model to represent diagram Experimental option Targets pure GEF Easy to understand nothing but EMF and GEF
26
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Notation Model
27
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 <sentenceRepresentation sentence="s.xmi#//@sentence"> <wordRepresentations word="s.xmi#//@sentence/@words.0"/> <wordRepresentations word="s.xmi#//@sentence/@words.1"> <wordRepresentations word="s.xmi#//@sentence/@words.2"/> <wordRepresentations word="s.xmi#//@sentence/@words.3"/> <wordRepresentations word="s.xmi#//@sentence/@words.4"/> <wordRepresentations word="s.xmi#//@sentence/@words.5" bold="true"/> Visual model: Styled text representation A dog sits in a car.
28
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Visual model: Styled text representation A dog sits in a car.
29
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 Thank you for your attention. www.eclipse.org/gmf
30
Introduction to the Graphical Modeling Framework | © 2008 by Borland Software Corp; made available under the EPL v1.0 GMF User interface (weak spot) Standard EMF-generated new model wizards GMF dashboard.ecore ->.gmfgraph,.gmftool,.gmfmap wizards
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.