Skip to content

Implement GEF based graphical editor #1183

@philip-alldredge

Description

@philip-alldredge

The current graphical editor is based on Graphiti. Graphiti itself is based on GEF-legacy. The graphical editor contains work arounds for issues that we have encountered while implementing graphical editor features. The graphical editor will be migrated to use JavaFX and GEF for the following reasons.

  • Font and DPI handling. The graphical editor has had problems with text clipping. Additionally, different system DPI result in diagrams being displayed differently. These issues have been minimized due to workarounds, but there are limitations on what can be done. The problems are exacerbated when trying to allow user configurable font sizes. The capabilities needed to resolve the issue are not available with GEF-legacy. JavaFX is a modern UI library which avoids many of these issues.
  • Lack of Flexibility. There are several areas where Graphiti does not provide the flexibility to implement desired features. Examples of such features are adding additional tools to the palette, providing feedback while the user is using palette items, and highlighting that is orthogonal to diagram element color. Other functionality is documented in this issue tracker. After the migration occurs, more functionality will be included in the graphical editor and that functionality will be customizable as needed.

Because there is an overlap in the capabilities of GEF MVC and the current graphical editor, the current plan is to build the editor out of the lower level GEF libraries which GEF MVC is based on. While avoiding the MVC layer will require implementing some functionality already provided by GEF MVC, it will allow a more straightforward and likely performant implementation. Once the consequences of not using GEF MVC have been explored by implementing basic functionality, a final decision will be made about which implementation path to take.

  • Basic GEF Non-MVC Proof of Concept.
    • Connections
    • Single select based on clicking. Basic highlighting.
    • Moving. Just basic to ensure there won't be unexpected issues.
    • Resize. Just basic to ensure there won't be unexpected issues.
    • Remove GEF MVC related code and dependencies.
  • Visualization. Consider SVG export while implementing.
    • Shapes. Docked and undocked.
      • Consider allowing bus graphic to adjust itself based on the largest dimension.
    • Basic Connections
    • Flow Indicators
    • Connection decorators
  • Basic Editor
    • Display of diagram with styling
    • Update diagram model based on JavaFX layout. As part of initial load? Connection labels should not be synchronized to diagram element unless manually set.
    • Update diagram based on model changes. Handle incremental layout and checking and relinking diagram context.
    • Update JavaFX nodes based on diagram changes.
    • Editor Title, Icon, and Dirty State
    • Save
    • Handle diagram file being moved.
    • Refresh images when changed.
    • Mouse wheel support for scrolling
    • Zooming. Combo box and mouse support(Ctrl + Mouse wheel)
    • Tooltips
    • Selection. Single, multiple, add, subtract. Area. Highlighting, handles, etc. Primary and secondary selection handles when multiple are selected.
    • Select and Marquee tools for palette.
    • Outline. Including link with editor, etc.
    • Property Sections
    • Context menu
    • Main menu items
    • Toolbar items
    • Undo/Redo
    • Start of automated test support. Opening diagrams, selecting elements, menus, property sections, outline
  • Diagram Editing
    • Edit bendpoints
    • Creating model elements from palette
    • Incremental Layout
    • Tools (Flow and Binding Editors)
    • Move shape and connection decorators. Include keyboard shortcuts.
    • Resizing
    • Snap to grid. Moving and resizing.
    • Double-click behavior
    • Delete Element
    • Rename Element/Direct Editing
    • Guides when resizing or moving elements. Labels, docked, shapes, regular shapes, etc.
    • Automated testing
  • Image Exporter
    • SVG Exporter
    • Export to raster formats (PNG, JPEG).
    • Update API
    • Develop new UI
  • Print support
  • Ensure consistent representation with different DPI settings and platforms and target JavaFX and Java runtimes.
  • Update automated tests to work with new editor
  • Optimize performance on large diagrams

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions