Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.emf.ecp.ui.e4.handlers
Class NewModelElementHandler

    java.lang.Object
      org.eclipse.emf.ecp.ui.e4.handlers.NewModelElementHandler

    public class NewModelElementHandler

extends Object

Handler to create new model elements on the root level of `ECPProject`s.

Author:
  Jonas

Constructor Summary
`NewModelElementHandler()`

Method Summary
`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
`equals, 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(value="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(value="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`

Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2015. All Rights Reserved.