Search in sources :

Example 1 with NewModelWizard

use of org.palladiosimulator.editors.sirius.ui.wizard.model.NewModelWizard in project Palladio-Editors-Sirius by PalladioSimulator.

the class ModelCreation method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    Shell activeShell = HandlerUtil.getActiveShell(event);
    NewModelWizard wizard = getModelCreationWizard();
    IWorkbench workbench = PlatformUI.getWorkbench();
    IStructuredSelection selection = (IStructuredSelection) workbench.getActiveWorkbenchWindow().getSelectionService().getSelection();
    wizard.init(workbench, selection);
    WizardDialog dialog = new WizardDialog(activeShell, wizard);
    dialog.open();
    return null;
}
Also used : IWorkbench(org.eclipse.ui.IWorkbench) Shell(org.eclipse.swt.widgets.Shell) NewModelWizard(org.palladiosimulator.editors.sirius.ui.wizard.model.NewModelWizard) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Aggregations

IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1 Shell (org.eclipse.swt.widgets.Shell)1 IWorkbench (org.eclipse.ui.IWorkbench)1 NewModelWizard (org.palladiosimulator.editors.sirius.ui.wizard.model.NewModelWizard)1