Graphiti "New and Noteworthy" for Indigo

Last revised January 12, 2012

This document describes the new development topics and bug fixes that were adressed during a milestone towards the release 0.8.2 within the Indigo release train.


The following bugs were fixed for the Indigo SR2 release of Graphiti (version number is 0.8.2)
  • Bug 357764 - IndexOutOfBoundsException when creating new ContainerShape inside existing one
  • Bug 365169 - DiagramEditorInternal's selectionChanged() method doesn't support FormEditor-based multipage editors
  • Bug 359217 - Documentation: Plugin-In structure page missing some plugins
  • Bug 359526 - NPE in DomainModelWorkspaceSynchronizerDelegate
  • Bug 368146 - RuntimeException during SVG export
  • Bug 370457 - SVG export is only installable with the feature


The following bugs were fixed for the Indigo SR1 release of Graphiti (version number is 0.8.1)
  • Bug 355347 - Depreciate and finally remove setters of Graphiti's Font Interface
  • Bug 352709 - Invalid image provider id crashes diagram editor
  • Bug 351053 - Check the need for WorkspaceCommandStackImpl
  • Bug 348662 - Setting tooltip to null in tool behavior provider doesn't clear up tooltip
  • Bug 348637 - Direct-editing box for connection text decorator has size issues
  • Bug 348634 - Direct-editing invoked again after user clicks away from the label and moves back


Undo/Redo support for Non-EMF domain models It is now possible to provide undo/redo functionality for operations on non-EMF domain models. In order to implement this, users of the Graphiti framework can implement the new interface ICustomUndoableFeature with their features or the new interface ICustomUndoablePattern with their patterns. If they do so, the feature or pattern will be called as soon as an undo or redo is performed for this feature. For details on this new possibility see Bugzilla 324859.

User selection context in IDirectEditing APIs So far the direct editing functionality in Graphiti was purely String-based. Entries in the drop down or for code completion could only be identified by the String they were also represented in the UI to the user. Now it is possible to define and provide a proposal support class based on the new interface IProposalSupport based on additional information, e.g placed in the direct editing context. This can serve e.g. tool builders having to deal with different objects that have the name, like classes with the same name residing in different packages. For details on this new possibility see Bugzilla 324058.

Double click for connections It is now possible to register A feature that will be executed on double click on a connection. This was so far only possible for shapes.

Round-offs and bugfixes Several smaller round-offs have been implemented:
  • Visualization during direct editing now completely fulfills the usability specification.
  • Opening a user-contributed editor within AbstractDrillDownFeature has been made easier by providing a protected method to open and a specific editor for a given diagram.
  • The framework is now prepared for users to deal with EMF objects that are equal in the sense of EMFUtil.equals but are not identical. For details on this new possibility see Bugzilla 335828.
Besides several bugs within the framework have been fixed.


Connections on Connections It is now possible to attach connections to other connections. The Graphiti metamodel offered this possibility already but the framework support for this was still lacking. Now, one can define so-called connection points to actually split existing connections. Technically these connection points are possibly active shapes that can be selected, moved or deleted as any other shape. As a tool builder you need to allow this new behavior when the user tries to drop a connection either via a CreateConnectionFeature or a ReconnectConnectionFeature. Example implementations are available in the Sketch testtool in the tests folder in the Graphiti CVS.

Font Management Graphiti now manages the fonts that are used inside a diagram just the way it was already done for colors. This feature was introduced in order to improve the graphics handles usage and number of classes instantiated; multiple uses of the same font will now lead to only one instance of that font existing inside the diagram. Just as the colors fonts are now managed at Diagram level and no longer on the individual graphical elements. Note: this is an minor incompatible change in the Graphiti API you will need to adapt to! There are no font creation methods any more, instead you will need to call manageFont on the diagram. Besides diagrams that were created using Graphiti versions before 0.8.0 M6 will need a migration if tool defined fonts are used. The Graphiti framework provides a small migration utility that can be triggered at an appropriate time by the tool. We decided explicitly against triggering the migration from the framework, because there will definitely by different requirements on the time of triggering in the various tool scenarios. Besides there will be tools that will need no migration at all and would be only suffer a time penalty from that check and migration being done in the framework. More details on the API change and the migrator can be found in the Bugzilla 323358.

URIEditorInput The Graphiti DiagramEditor now accepts URIEditorInput objects. They can be created outside the editor and the editor will care about opening the corresponding diagram.

Resource Saved Hook A new hook resourcesSaved() has been introduced in the diagram type provider. It will be called by the framework right after a diagram has been saved.

Pattern Enhancements Graphiti patterns now allow the integration of delete, remove and direct editing features. These functionalities before had to be implemented within separate features. Besides the patterns now easily allow to prevent that a creation tool entry is created for them in the editor palette.

Printing and Saving as Image Graphiti supports printing and saving a diagram to an image. There have always been hooks were the user can influence the default behaviors for these operations. Nevertheless it was not clear if the way this was enabled was really feasible. An investigation of the two features that exist for those purposes (DefaultPrintFeature and DefaultSaveImageFeature) showed that tool builders can rudimentary implement behavioral changes to those features (like changing the selection in the editor), so it makes sense to keep the implementations available. The existing state was documented in the JavaDoc at the appropriate classes and methods and a not used property in the save context was removed. This functionality might be subject to further enhancement request as tools need more possibilities to influence the behavior.

Fixing of Bugs Some bugs in the area of anchor handling and drill down features were fixed. Also, the used SUA was updated to the newest Indigo version.


Globalization Graphiti now uses resource bundles for all its texts and is ready to be translated.

API Usages Graphiti now uses other projects only via their public APIs. Usages of GEF internal stuff has been removed.

Accessibility Graphiti now fully supports themes like the high contrast mode to enable Accessibility for disabled users. Some gaps in presenting selections and gradients were closed.

Prevent Multiple Popups When deleting more than one object a confirmation popup for each of the objects was presented to the user. This has been improved so that the user has the option "Yes for all" available.

Fixing of Bugs Some bugs especially in the area of the zoom animation, ContextButtonPadData and grid alignment were fixed.


Indigo Release Train Graphiti declared its participation in the Indigo release train. All project metadata settings were done and the project update site is aggregated into the common Indigo milestones update site.

Vector Graphics Export Diagrams can now be exported also in vector graphics format (SVG). This is available from the save as dialog of a diagram editor besides the traditional save as JPG, BMP etc.

Filling of functional gaps Some functional gaps like missing services, automated resizing for combo boxes, creation of color constants from RGB string etc. were filled.

Fixing of bugs Some bugs (especially in the area of refreshing the diagram were fixed.