use of org.eclipse.jface.wizard.WizardDialog in project bndtools by bndtools.
the class RepositoryBundleSelectionPart method doAdd.
private void doAdd() {
try {
RepoBundleSelectionWizard wizard = createBundleSelectionWizard(getBundles());
if (wizard != null) {
WizardDialog dialog = new WizardDialog(getSection().getShell(), wizard);
if (dialog.open() == Window.OK) {
setBundles(wizard.getSelectedBundles());
markDirty();
}
}
} catch (Exception e) {
ErrorDialog.openError(getSection().getShell(), "Error", null, new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error opening bundle resolver wizard.", e));
}
}
use of org.eclipse.jface.wizard.WizardDialog 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;
}
use of org.eclipse.jface.wizard.WizardDialog in project Palladio-Editors-Sirius by PalladioSimulator.
the class PalladioProjectCreation method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
Shell activeShell = HandlerUtil.getActiveShell(event);
NewPalladioProjectWizard wizard = new NewPalladioProjectWizard();
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;
}
use of org.eclipse.jface.wizard.WizardDialog in project xtext-xtend by eclipse.
the class CreateXtendTypeQuickfixes method newXtendInterfaceQuickfix.
protected void newXtendInterfaceQuickfix(final String typeName, final String explicitPackage, final XtextResource resource, Issue issue, IssueResolutionAcceptor issueResolutionAcceptor) {
String packageDescription = getPackageDescription(explicitPackage);
issueResolutionAcceptor.accept(issue, "Create Xtend interface '" + typeName + "'" + packageDescription, "Opens the new Xtend interface wizard to create the type '" + typeName + "'" + packageDescription, "xtend_file.png", new IModification() {
@Override
public void apply(/* @Nullable */
IModificationContext context) throws Exception {
runAsyncInDisplayThread(new Runnable() {
@Override
public void run() {
NewElementWizard newXtendInterfaceWizard = newXtendInterfaceWizardProvider.get();
WizardDialog dialog = createWizardDialog(newXtendInterfaceWizard);
NewXtendInterfaceWizardPage page = (NewXtendInterfaceWizardPage) newXtendInterfaceWizard.getStartingPage();
configureWizardPage(page, resource.getURI(), typeName, explicitPackage);
dialog.open();
}
});
}
});
}
use of org.eclipse.jface.wizard.WizardDialog in project xtext-xtend by eclipse.
the class CreateXtendTypeQuickfixes method newXtendClassQuickfix.
protected void newXtendClassQuickfix(final String typeName, final String explicitPackage, final XtextResource resource, Issue issue, IssueResolutionAcceptor issueResolutionAcceptor) {
String packageDescription = getPackageDescription(explicitPackage);
issueResolutionAcceptor.accept(issue, "Create Xtend class '" + typeName + "'" + packageDescription, "Opens the new Xtend class wizard to create the type '" + typeName + "'" + packageDescription, "xtend_file.png", new IModification() {
@Override
public void apply(/* @Nullable */
IModificationContext context) throws Exception {
runAsyncInDisplayThread(new Runnable() {
@Override
public void run() {
NewElementWizard newXtendClassWizard = newXtendClassWizardProvider.get();
WizardDialog dialog = createWizardDialog(newXtendClassWizard);
NewXtendClassWizardPage page = (NewXtendClassWizardPage) newXtendClassWizard.getStartingPage();
configureWizardPage(page, resource.getURI(), typeName, explicitPackage);
dialog.open();
}
});
}
});
}
Aggregations