Class NewModelElementHandler
- java.lang.Object
-
- org.eclipse.emf.ecp.ui.e4.handlers.NewModelElementHandler
-
public class NewModelElementHandler extends java.lang.Object
Handler to create new model elements on the root level ofECPProject
s.- Author:
- Jonas
-
-
Constructor Summary
Constructors Constructor Description NewModelElementHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canExecute(ECPProject ecpProject)
Checks if the current selection is anECPProject
.void
execute(org.eclipse.swt.widgets.Shell shell, ECPProject ecpProject)
Opens a dialog to select a newEObject
to be created.
-
-
-
Method Detail
-
execute
@Execute public void execute(org.eclipse.swt.widgets.Shell shell, @Named("org.eclipse.ui.selection") @Optional ECPProject ecpProject)
Opens a dialog to select a newEObject
to be created.- Parameters:
shell
- the Shell to display the dialog.ecpProject
- the selectedECPProject
, parent of the newly createdEObject
-
canExecute
@CanExecute public boolean canExecute(@Named("org.eclipse.ui.selection") @Optional ECPProject ecpProject)
Checks if the current selection is anECPProject
.- Parameters:
ecpProject
- the current selection, if it is anECPProject
or null otherwise.- Returns:
- if the current selection is an
ECPProject
-
-