Class ConnectionEditPolicy

java.lang.Object
org.eclipse.gef.editpolicies.AbstractEditPolicy
org.eclipse.gef.editpolicies.ConnectionEditPolicy
All Implemented Interfaces:
EditPolicy, RequestConstants

public abstract class ConnectionEditPolicy extends AbstractEditPolicy
A model-based EditPolicy for connections. A model-based EditPolicy only knows about the host's model and the basic operations it supports. By default, ConnectionEditPolicy understands only DELETE. Subclasses can add support to handle additional behavior specific to the model.

This EditPolicy is not a GraphicalEditPolicy, and should not be used to show feedback or interact with the host's visuals in any way.

Since:
2.0
  • Constructor Details

    • ConnectionEditPolicy

      public ConnectionEditPolicy()
  • Method Details

    • getCommand

      public Command getCommand(Request request)
      Description copied from class: AbstractEditPolicy
      Returns null by default. null is used to indicate that the EditPolicy does not contribute to the specified Request.
      Specified by:
      getCommand in interface EditPolicy
      Overrides:
      getCommand in class AbstractEditPolicy
      Parameters:
      request - the Request
      Returns:
      null or a Command contribution
      See Also:
    • getDeleteCommand

      protected abstract Command getDeleteCommand(GroupRequest request)
      Subclasses should implement to return the Command to delete the connection.
      Parameters:
      request - the DeleteRequest
      Returns:
      the Command to delete the connection