org.eclipse.graphiti.func

## Interface IDelete

All Known Subinterfaces:
  IDeleteFeature, IPattern

All Known Implementing Classes:
  AbstractPattern, DefaultDeleteFeature, DeleteFeatureForPattern, IdPattern, TypedPattern

    public interface IDelete

Instances of this interface provide the behavior to delete objects. Deleting means removing both the business object from its model as well as its graphical representation from the diagram.

Since:
  0.8.0

### Method Summary

All Methods Instance Methods Abstract Methods
`boolean` `canDelete(IDeleteContext context)` Can delete hook.
`void` `delete(IDeleteContext context)` Hook to implement the actual delete functionality.
`boolean` `isDeleteAbort()` The Graphiti framework will call this method after `preDelete(IDeleteContext)` has been called and before the actual delete is done.
`void` `postDelete(IDeleteContext context)` Post delete hook that can be implemented by users to perform any operations that need to be done after the standard delete functionality ends.
`void` `preDelete(IDeleteContext context)` Pre delete hook that can be implemented by users to perform any operations that need to be done before the standard delete functionality starts.

### Method Detail

#### canDelete

    boolean canDelete(IDeleteContext context)

Can delete hook. Needs to be implemented in order to decide if a feature can (and wants to) handle a delete request.

Parameters:
  `context` - the context describing the request
Returns:
  `true`, if the feature can perform the delete operation

#### preDelete

    void preDelete(IDeleteContext context)

Pre delete hook that can be implemented by users to perform any operations that need to be done before the standard delete functionality starts. Be sure to call `DefaultDeleteFeature#setDoneChanges(boolean)` in case you modify any EMF objects to enable that the command stack gets updated.

Parameters:
  `context` - the context

#### isDeleteAbort

    boolean isDeleteAbort()

The Graphiti framework will call this method after `preDelete(IDeleteContext)` has been called and before the actual delete is done. In case this method returns `true`, the operation will be cancelled by the Graphiti framework by throwing an `OperationCanceledException` that causes am EMF revert of the operation.

Implementing classes might e.g. set a flag in `preDelete(IDeleteContext)` as cancellation indication and check that that flag here.

Returns:
  `true` in case you want to cancel the current operation, `false` otherwise.
Since:
  0.12

#### delete

    void delete(IDeleteContext context)

Hook to implement the actual delete functionality.

Parameters:
  `context` - the context

#### postDelete

    void postDelete(IDeleteContext context)

Post delete hook that can be implemented by users to perform any operations that need to be done after the standard delete functionality ends.

Parameters:
  `context` - the context