Class NewModelElementHandler


  • public class NewModelElementHandler
    extends java.lang.Object
    Handler to create new model elements on the root level of ECPProjects.
    Author:
    Jonas
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canExecute​(ECPProject ecpProject)
      Checks if the current selection is an ECPProject.
      void execute​(org.eclipse.swt.widgets.Shell shell, ECPProject ecpProject)
      Opens a dialog to select a new EObject to be created.
      • Methods inherited from class java.lang.Object

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

      • NewModelElementHandler

        public NewModelElementHandler()
    • 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 new EObject to be created.
        Parameters:
        shell - the Shell to display the dialog.
        ecpProject - the selected ECPProject, parent of the newly created EObject
      • canExecute

        @CanExecute
        public boolean canExecute​(@Named("org.eclipse.ui.selection") @Optional
                                  ECPProject ecpProject)
        Checks if the current selection is an ECPProject.
        Parameters:
        ecpProject - the current selection, if it is an ECPProject or null otherwise.
        Returns:
        if the current selection is an ECPProject