Eclipse Tools Graphical Editor Framework Proposal

Description

The Graphical Editor Framework (GEF) Proposal consists of 2 runtime plugins, their corresponding ISV documentation plugins, and 1 or more examples.  I assume that only runtime plugins and their source are licensed under the Open Source license, and the remaining plugins are made available to developers, but not for redistribution.

As a framework, GEF's goal is to provide the most benefit in and easy-to-learn form while avoiding feature bloat.  The GEF "component" is separated into 2 plugins, GEF and draw2d.  draw2d is a lightweight widgeting system that provides the entire paint/layout system for GEF's graphical views.  draw2d requires SWT and little else.  GEF adds to this the ability to interact with a UI in a consistent and extensible manner.  GEF adds logical objects (EditParts) to which all interaction requests get routed.  They are the "controller" in typical MVC architecture.  GEF also adds Tools, which process low level SWT events and turn them into higher-level requests that get dispatched to EditParts.  GEF also contains a lot of Workbench support for Graphical Editors, such as reusable Actions, contributors, context menu, a palette, etc.

We are looking for contributions from the open source community in the areas of testers, developers and general users who can help us ensure that GEF works well on all the Eclipse platforms.

draw2d currently includes:

  • Double buffered painting and optimized layouts
  • Various Figure and Layouts implementations
  • Simple event routing to figures (mouse and keyboard)
  • Border support on figures
  • Cursor and tooltip support
  • Connection anchoring, routing and decorating
  • Multiple layers
  • Flexible coordinate systems
  • Overview window (thumbnail with scrolling)

GEF currently includes:

  • Tools like Selection, Creation, Connection and Marquee tools.
  • A Palette for displaying those tools
  • Handles for resizing objects and bending connections
  • Two types of GEF Viewers (Graphical and Tree)
  • A controller framework for mapping the business model to the UI's view.
    • Plug-in policies for mapping interactions with the view to changes in the model
    • Various implementations for showing feedback and adding selection handles
    • Various request types and tools or actions that send these requests to the controllers
  • Undo/Redo support via Commands and a Stack

Status

GEF is being used in several existing products. The API is relatively stable, but we have not claimed binary compatibility with future major releases like the Eclipse Platform.

Platforms

The plugins are written in Java with no native code and thus may be ported to any platform supported by Eclipse.

Content

We provide a total of 5 plugins and packages:

  1. com.ibm.draw2d - The draw2d plugin
  2. com.ibm.gef - The GEF plugin, requires draw2d
  3. com.ibm.draw2d.doc.isv - ISV integrated Help
  4. com.ibm.gef.doc.isv - ISV integrated Help
  5. com.ibm.gef.example.logic - An example that show containers, nodes, and connections.

Development plan

The following line items are under current development for Websphere 5.0:
  • Drag and Drop support using Delegating Drag/Drop objects (similar to JDT).
  • Reusing JFace CellEditors for direct edit behavior
  • Alignment Actions (align center, bottom, left, etc.)

The following items are in various stages of development and are uncommitted:

Draw2d

  • Zoom support
  • Negative scrolling/scrolling based on connection bendpoints
  • Rich Text figures/Wrapping labels
  • Focus traversal
  • Overview window background updating.
  • Enhanced connection routing (automatic collision avoidance)
  • Context menu support

GEF

  • Constrained Resize (e.g. proportional, about the center)
  • AutoScroll during Tool and DND interactions
  • Palette UI changes
  • Snap-to-geometry
  • Guide support
  • Print support (through scaling)