Interface IDelete

    • 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