Class DeleteModelElementHandler


  • public class DeleteModelElementHandler
    extends java.lang.Object
    Handler to delete selected EObject.
    Author:
    Jonas
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canExecute​(org.eclipse.emf.ecore.EObject eObject, java.util.List<org.eclipse.emf.ecore.EObject> eObjects)
      Checks if one EObject or a list of EObjects are selected.
      void execute​(org.eclipse.emf.ecore.EObject eObject, java.util.List<org.eclipse.emf.ecore.EObject> eObjects)
      Deletes a single EObject or a list of EObject.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeleteModelElementHandler

        public DeleteModelElementHandler()
    • Method Detail

      • execute

        @Execute
        public void execute​(@Named("org.eclipse.ui.selection") @Optional
                            org.eclipse.emf.ecore.EObject eObject,
                            @Named("org.eclipse.ui.selection") @Optional
                            java.util.List<org.eclipse.emf.ecore.EObject> eObjects)
        Deletes a single EObject or a list of EObject.
        Parameters:
        eObject - the eobject to be deleted or null, if several eobjects are to be deleted.
        eObjects - A List of EObjects to be deleted or null, if only one EObject should be deleted.
      • canExecute

        @CanExecute
        public boolean canExecute​(@Named("org.eclipse.ui.selection") @Optional
                                  org.eclipse.emf.ecore.EObject eObject,
                                  @Named("org.eclipse.ui.selection") @Optional
                                  java.util.List<org.eclipse.emf.ecore.EObject> eObjects)
        Checks if one EObject or a list of EObjects are selected.
        Parameters:
        eObject - the selected eobject or null, if several or none eobjects are selected.
        eObjects - the list of selected eobjects or null, if one or none eobjects are selected.
        Returns:
        true if one EObject or a list of EObjects are selected.