use of org.eclipse.jface.wizard.WizardDialog in project bndtools by bndtools.
the class PluginsPart method doAdd.
void doAdd() {
PluginSelectionWizard wizard = new PluginSelectionWizard();
WizardDialog dialog = new WizardDialog(getManagedForm().getForm().getShell(), wizard);
if (dialog.open() == Window.OK) {
HeaderClause newPlugin = wizard.getHeader();
data.add(newPlugin);
viewer.add(newPlugin);
markDirty();
}
}
use of org.eclipse.jface.wizard.WizardDialog in project bndtools by bndtools.
the class PluginsPart method doEdit.
void doEdit() {
HeaderClause header = (HeaderClause) ((IStructuredSelection) viewer.getSelection()).getFirstElement();
if (header != null) {
Attrs copyOfProperties = new Attrs(header.getAttribs());
IConfigurationElement configElem = configElements.get(header.getName());
PluginEditWizard wizard = new PluginEditWizard(configElem, copyOfProperties);
WizardDialog dialog = new WizardDialog(getManagedForm().getForm().getShell(), wizard);
if (dialog.open() == Window.OK && wizard.isChanged()) {
header.getAttribs().clear();
header.getAttribs().putAll(copyOfProperties);
viewer.update(header, null);
markDirty();
}
}
}
use of org.eclipse.jface.wizard.WizardDialog in project bndtools by bndtools.
the class GenerateIndexCommandHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection) {
IStructuredSelection structSel = (IStructuredSelection) selection;
Object element = structSel.getFirstElement();
if (element != null && element instanceof IContainer) {
NewIndexWizard wizard = new NewIndexWizard();
IWorkbenchWindow workbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
wizard.init(workbenchWindow.getWorkbench(), structSel);
WizardDialog dialog = new WizardDialog(workbenchWindow.getShell(), wizard);
dialog.open();
}
}
return null;
}
use of org.eclipse.jface.wizard.WizardDialog in project yamcs-studio by yamcs.
the class UpdateHandler method doExecute.
@Override
protected void doExecute(LoadMetadataRepositoryJob job) {
if (hasNoRepos) {
MessageDialog.openInformation(null, "Update Yamcs Studio", "Could not check for updates since no repository is configured");
return;
}
UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
// check for updates
operation.resolveModal(null);
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
if (UpdateSingleIUWizard.validFor(operation)) {
// Special case for only updating a single root
UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
WizardDialog dialog = new WizardDialog(getShell(), wizard);
dialog.create();
dialog.open();
} else {
// Open the normal version of the update wizard
getProvisioningUI().openUpdateWizard(false, operation, job);
}
}
}
use of org.eclipse.jface.wizard.WizardDialog in project yamcs-studio by yamcs.
the class AddNewParameterAction method run.
@Override
public void run() {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
AddParameterWizard wizard = new AddParameterWizard();
WizardDialog dialog = new WizardDialog(shell, wizard);
if (dialog.open() == Window.OK)
for (ParameterInfo info : wizard.getParameter()) viewer.addParameter(info);
}
Aggregations