Class DeleteKeyHandler

  • All Implemented Interfaces:
    org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2

    public class DeleteKeyHandler
    extends org.eclipse.core.commands.AbstractHandler
    Handler for "Delete" action.
    • Constructor Detail

      • DeleteKeyHandler

        public DeleteKeyHandler()
    • Method Detail

      • delete

        public void delete​(Collection<BpEntity> entities,
                           Collection<BpRelation> relations)
        Deletes given entities and relations from active diagram.
        Parameters:
        entities - - entities to remove. Can't be null.
        relations - - relations to remove. Can't be null
      • execute

        public Object execute​(org.eclipse.core.commands.ExecutionEvent event)
                       throws org.eclipse.core.commands.ExecutionException
        Throws:
        org.eclipse.core.commands.ExecutionException
      • getEntitiesToRemove

        public Collection<BpEntity> getEntitiesToRemove​(BpScheme bpScheme)
        Returns entities to remove. (entities associated with selected figures)
        Parameters:
        bpScheme - - BP scheme. Can't be null.
        Returns:
        entities to remove. (entities associated with selected figures). Can't return null.
      • getRelationsToRemove

        public Collection<BpRelation> getRelationsToRemove​(BpScheme bpScheme)
        Returns relations to remove. (deletable relations associated with selected connections).
        Parameters:
        bpScheme - - BP scheme. Can't be null
        Returns:
        relations to remove. (deletable relations associated with selected connections). Can't return null.