Java Reference
In-Depth Information
and many independently developed applications. GMF uses the EMF Trans-
action component for commands that impact the underlying model elements,
which is built upon the platform's command infrastructure.
The heart of command support for undoable operations on model elements
is AbstractTransactionalCommand , which has a number of provided sub-
classes, as shown in Figure 10-51, and is found in the package org.eclipse.
gmf.runtime.emf.commands.core.command . Look to the org.eclipse.
gmf.runtime.diagram.core.commands and *. diagram.ui.commands
packages for many common commands for use in diagrams, such as these:
AddCommand
CreateDiagramCommand
DeleteCommand
GroupCommand and UngroupCommand
RemoveBookmarkCommand
SetConnectionAnchorsCommand
SetConnectionEndsCommand
SetPropertyCommand
CreateCommand
DeferredCreateConnectionView
Command
DeferredLayoutCommand
Commands have corresponding requests and are often invoked by a user
Action. The DiagramAction abstract class is provided and has a number of sub-
classes to cover most diagram actions. Many of these are internal classes, but
they can be examined to better understand how to use the command infrastruc-
ture of the diagram runtime. Figure 10-52 shows the DiagramAction class and
a number of its available subclasses.
Search WWH ::




Custom Search