use of org.eclipse.jface.wizard.WizardDialog in project yamcs-studio by yamcs.
the class AddToStackHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
Shell shell = HandlerUtil.getActiveShellChecked(event);
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
IWorkbenchPart part = window.getActivePage().findView(CommandStackView.ID);
CommandStackView commandStackView = (CommandStackView) part;
AddToStackWizard wizard = new AddToStackWizard();
WizardDialog dialog = new WizardDialog(shell, wizard);
if (dialog.open() == Window.OK)
commandStackView.addTelecommand(wizard.getTelecommand());
return null;
}
use of org.eclipse.jface.wizard.WizardDialog in project meclipse by flaper87.
the class MeclipseView method makeActions.
private void makeActions() {
final MeclipseView mView = this;
connection = new Action() {
public void run() {
ConnectionWizard wizard = new ConnectionWizard();
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.open();
mView.refreshMe();
}
};
connection.setText(getCaption("connection.new"));
connection.setToolTipText(getCaption("connection.new"));
connection.setImageDescriptor(Images.getDescriptor(Images.PageCommit));
doubleClickAction = new Action() {
public void run() {
ISelection selection = viewer.getSelection();
TreeObject obj = (TreeObject) ((IStructuredSelection) selection).getFirstElement();
obj.doubleClickAction();
}
};
}
use of org.eclipse.jface.wizard.WizardDialog in project meclipse by flaper87.
the class MeclipsePlugin method openWizard.
/**
* Stolen from
* http://torkildr.blogspot.com/2010/07/invoking-eclipse-wizard.html
*
* @param id
*/
public void openWizard(String id) {
// First see if this is a "new wizard".
IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(id);
// If not check if it is an "import wizard".
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(id);
}
// Or maybe an export wizard
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(id);
}
try {
// Then if we have a wizard, open it.
if (descriptor != null) {
IWizard wizard = descriptor.createWizard();
WizardDialog wd = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
wd.setTitle(wizard.getWindowTitle());
wd.open();
}
} catch (CoreException e) {
e.printStackTrace();
}
}
use of org.eclipse.jface.wizard.WizardDialog in project cubrid-manager by CUBRID.
the class ExportDataWizard method addPages.
/**
* Add wizard page
*/
public void addPages() {
exportTypePage = new ExportTypePage();
addPage(exportTypePage);
exportSettingPage = new ExportSettingPage();
addPage(exportSettingPage);
exportSettingForLoadDBPage = new ExportSettingForLoadDBPage();
addPage(exportSettingForLoadDBPage);
confirmPage = new ExportDataConfirmPage();
addPage(confirmPage);
setWindowTitle(Messages.exportShellTitle);
WizardDialog dialog = (WizardDialog) getContainer();
dialog.addPageChangedListener(exportTypePage);
dialog.addPageChangedListener(exportSettingPage);
dialog.addPageChangedListener(exportSettingForLoadDBPage);
dialog.addPageChangedListener(confirmPage);
dialog.addPageChangingListener(exportTypePage);
dialog.addPageChangingListener(exportSettingPage);
dialog.addPageChangingListener(exportSettingForLoadDBPage);
dialog.addPageChangingListener(confirmPage);
}
use of org.eclipse.jface.wizard.WizardDialog in project azure-tools-for-java by Microsoft.
the class CreateNewDockerHostAction method actionPerformed.
@Override
public void actionPerformed(NodeActionEvent event) {
try {
if (!SignInCommandHandler.doSignIn(PluginUtil.getParentShell()))
return;
IProject project;
Shell shell = PluginUtil.getParentShell();
try {
project = AzureDockerUIResources.getCurrentSelectedProject();
} catch (Exception Ignored) {
project = null;
}
if (project == null) {
project = (IProject) dockerHostModule.getProject();
}
AzureManager azureAuthManager = AuthMethodManager.getInstance().getAzureManager();
// not signed in
if (azureAuthManager == null) {
return;
}
AzureDockerHostsManager dockerManager = AzureDockerHostsManager.getAzureDockerHostsManager(azureAuthManager);
if (!dockerManager.isInitialized()) {
AzureDockerUIResources.updateAzureResourcesWithProgressDialog(shell, project);
if (AzureDockerUIResources.CANCELED) {
return;
}
dockerManager = AzureDockerHostsManager.getAzureDockerHostsManagerEmpty(null);
}
if (dockerManager.getSubscriptionsMap().isEmpty()) {
PluginUtil.displayErrorDialog(shell, "Create Docker Host", "Must select an Azure subscription first");
return;
}
AzureNewDockerWizard newDockerWizard = new AzureNewDockerWizard(project, dockerManager);
WizardDialog createNewDockerHostDialog = new AzureWizardDialog(shell, newDockerWizard);
if (createNewDockerHostDialog.open() == Window.OK) {
newDockerWizard.createHost();
}
} catch (Exception ex1) {
log.log(Level.SEVERE, "actionPerformed", ex1);
ex1.printStackTrace();
}
}
Aggregations