Eclipse Plugins RCP GEF
 
 
Graphical Editor Framework (GEF)
 
Duration:   2 days Level:  Advanced Format:   50% hands-on
 
Description:
Eclipse is an open platform for tool integration built by an open community of tool providers. The course covers advanced concepts in developing Eclipse plug-in using GEF.

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.
 
Topics:
1 Overview of Draw 2D API
2 Developing Graphical Editor using GEF API
3 Editing GEF Model
4 Using connections in GEF
 
Contents:
1 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
  Lab

ExDraw2D: Developing shapes using the Eclipse Draw 2D API

Goals

 
  • Learn how to render and layout different figures using Draw 2D API
  • Learn to create Clickable button controls and register action listeners to create various figures like Rectangle, Triangle, Ellipse and a custom figure
  • Learn to handle Action-events on Button figures and Mouse-events on figures
   
2 Introduction to GEF API
 
  • Introduction
  • MVC for GEF
  • In-memory model of GEF editor
  • In-memory model of EditPartViewer
  • Create Model
  • Create View
  • EditParts
  • GraphicalEditors
  • Building a graphical editor
  Lab

ExGEF_GraphicalEditor: Drawing database schema diagrams using GEF

Goals

 
  • Learn how to use GEF API
  • Define model to render, create views and controllers
  • Understand the life-cycle of EditParts
  • Create Graphical Editor using Draw 2D and GEF Framework that renders database schema diagram (showing list of tables with columns)
   
3 Editing GEF model
 
  • Understand the notification mechanism in MVC pattern
  • Registering EditPart as controller
  • Reacting to the events and update the UI
  • The EditDomain
  • The PaletteViewer
  • Tools, Requests and Feedbacks
  • Commands in GEF
  • Command Stack
  • EditPolicies
  • Capture user actions on GUI and update the model
  Lab

ExGEF_EditModel: Editing schema diagrams using

Goals

 
  • Learn how to listen changes to the Table model and update the associated view
  • Fill the Palette with SelectionToolEntry, MarqueeToolEntry and a tool for creating tables / columns
  • Capture user actions on GUI and change the model
   
4 Using connections in GEF
 
  • Connections in GEF
  • The Polyline class
  • The Connection interface
  • The ConnectionAnchor interface
  • The ConnectionRouter interface
  • The ConnectionLayer class
  • The PolylineConnection class
  • The AbstractConnectionEditPart and NodeEditPart
  • Editing model to maintain connections
  • Components in creating and editing Connections
  • Bendpoints
  • Components in bending connections
  Lab

ExGEF_Connections: Manage connections and bendpoints between diagrams

Goals

 
  • Learn how to create new connection between table diagrams using EditPolicies and Commands
  • Understand how a connection gets attached to an EditPart
  • Learn how to manage bendpoints in diagrams using EditPolicies and Commands
Prerequisites:
This 2 day course assumes that attendees have strong Java GUI experience, have full understanding of SWT-Views-Editors, and have developed some plugins. Prerequisites can be satisfied by taking Eclipse University courses: "Developing Eclipse Plug-ins".
   
Audience:
Tool developers, tool vendors, and consultants who need to build their own plugins for Eclipse-based tools.