Eclipse Plugins RCP GEF
 
 
Eclipse Modeling with EMF, GEF and GMF
 
Duration:   5 days Level:  Advanced Format:   50% hands-on
 
Description:

EMF:                    1.5 days
Draw2D & GEF:    2.0 days
GMF:                   1.5 days


Eclipse is an open platform for tool integration built by an open community of tool providers. The course covers model-based development technologies within the Eclipse community.

Eclipse Modeling Framework (EMF) is a modeling framework and code generation facility for building tools and other applications based on a structured data model.

 

The Graphical Editing Framework (GEF) provides a foundation for building rich, interactive user interfaces, which are not easily built using native widgets found in the base Eclipse platform. GEF is based on MVC architecture, every GEF-based application uses a model to represent the state of the diagrams being created and edited.

 

Graphical Modeling Framework (GMF) provides a generative components and runtime infrastructures for developing graphical editors based on EMF and GEF.

 
Topics covered include:
1 Modeling – Introduction
2 Eclipse Modeling Framework
3 EMF Runtime API
4 EMF – Customize Code Generation
5 Draw 2D API
6 Rendering business model using Graphical Editing Framework (GEF)
7 Editing using GEF
8 Using connections in GEF
9 Additional GEF techniques
10 GMF – Introduction
11 GMF Runtime and Tooling
12 Customizing the GMF Generated Editor
 
Contents:
1 Modeling – Introduction
 
  • Modeling Overview
  • Model driven architecture
  • Eclipse EMF
   
2 Eclipse Modeling Framework
 
  • Understand Eclipse Modeling Framework (EMF)
  • The ecore model
  • The Generator Model
  • Generating EMF Model from Annotated Java Code
  • Generate Model implementation code
  • Generate model.edit and model.editor plug-ins
   
3 EMF Runtime API
 
  • Resource and ResourceSet
  • Instantiation and Modification of entities
  • Use Reflective API for managing model instances
  • Notifications and adapters mechanism
  • Serialize model in XMI format
   
4 EMF – Customize Code Generation
 
  • Learn techniques to customize code generation in EMF
  • Understand GenModel properties
  • Edit GenModel properties to customize code generation
  • EMF.Edit framework overview
   
5 Draw 2D API
 
  • Draw 2D introduction
  • Overview of Draw 2D system
  • Figures
  • LightweightSystem and its components
  • Draw 2D Shapes
  • Draw 2D Widgets
  • Major features of Draw 2D API
  • Draw 2D application
    • Creating Shell and LightweightSystem
    • Creating Figures and Connection
    • Registering event handlers
    • Handling Draw 2D events
   
6 Rendering business model using Graphical Editing Framework (GEF)
 
  • Introduction
  • MVC for GEF
  • In-memory model of GEF editor
  • EditParts
  • Creating Models
  • Creating Views
  • Creating Controllers
  • GraphicalEditors
  • Building a graphical editor
   
7 Editing using GEF
 
  • Understand the notification mechanism in MVC pattern
  • Create a model and register EditPart as controller
  • Listen events and refresh the UI
  • Role of the Edit Domain
  • Tools, Requests and Feedback
  • Commands in GEF
  • Implementing the Command Stack
  • EditPolicies
  • Pallette
  • Handle User interactions and update the model
   
8 Using connections in GEF
 
  • Overview
  • Draw 2D Parts of a Connection
    • Polyline Class
    • Connection Interface
    • ConnectionAnchor Interface
    • ConnectionLayer Class
    • PolylineConnection Class
  • GEF Parts of a Connection
    • The View for a Connection
    • The Controller for a Connection
    • The Connection Nodes
  • Bendpoints
  • Components in bending connections
   
9 Additional GEF techniques
 
  • Drag and Drop
  • Adapting to the Properties View
  • Displaying Model Information in the Outline View
  • Printing
  • Zooming
  • Handling Keystrokes
   
10 GMF – Introduction
 
  • Overview of GMF
  • GMF generation process
  • Domain model definition
  • Graphical definition
  • Tooling definition
  • Mapping definition
   
11 GMF Runtime and Tooling
 
  • Contribution for the generated editor
  • XPand for code generation
   
12 Customizing the GMF Generated Editor
 
  • GMF gen model
  • Use gmfgen model to customize generated code
  • Some advanced techniques
   
Hands-on Labs:
1 ExEMF-Model: Generating an EMF Model using Annotated Java Interfaces
2 ExEMF-CustomizeCoding: Customizing and Manipulating the Model
3 ExDraw2D: Draw Figures using Eclipse Draw 2D
4 ExBuildGEFEditor: Render model using GEF
5 ExGEF_EditModel: Managing model and views using EditParts
6 ExGEF_Connections: Manage Connections Between Diagrams
7 ExGEF_Techniques: Use Additional Techniques to Create a Robust Editor
8 ExGMF_Editor: Create graphical editor for domain models
9 ExGMF_Customize: Use gmfgen model and advanced techniques to customize the GMF generated editor
   
Prerequisites:
Knowledge of Eclipse IDE and developing some Eclipse plug-ins. Prerequisites can be satisfied by taking AvantSoft course: "Developing Eclipse Plug-ins".
   
Audience:
Tool developers, tool vendors, and consultants who need to build their own plugins for Eclipse-based tools.