Class DeleteModelElementHandler
- java.lang.Object
-
- org.eclipse.emf.ecp.ui.e4.handlers.DeleteModelElementHandler
-
public class DeleteModelElementHandler extends java.lang.Object
Handler to delete selectedEObject
.- Author:
- Jonas
-
-
Constructor Summary
Constructors Constructor Description DeleteModelElementHandler()
-
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 singleEObject
or a list ofEObject
.
-
-
-
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 singleEObject
or a list ofEObject
.- 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 oneEObject
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.
-
-