use of org.eclipse.jface.wizard.WizardDialog in project tesb-studio-se by Talend.
the class CreateRouteResourceAction method doRun.
@Override
protected void doRun() {
IRepositoryNode node = null;
NewRouteResourceWizard wizard = null;
ISelection selection = getSelection();
if (selection == null) {
return;
}
Object obj = ((IStructuredSelection) selection).getFirstElement();
node = (IRepositoryNode) obj;
IRepositoryService service = DesignerPlugin.getDefault().getRepositoryService();
IPath path = service.getRepositoryPath(node);
if (RepositoryConstants.isSystemFolder(path.toString())) {
// Not allowed to create in system folder.
return;
}
wizard = new NewRouteResourceWizard(path);
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
int open = dlg.open();
if (open == Window.OK) {
RouteResourceItem item = wizard.getItem();
IWorkbenchPage page = getActivePage();
RouteResourceEditorUtil.openEditor(page, null, item);
}
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class CreateDocumentationAction method doRun.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
protected void doRun() {
DocumentationCreateWizard docWizard = new DocumentationCreateWizard(PlatformUI.getWorkbench(), getPath());
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), docWizard);
dlg.open();
RepositoryNode node = (RepositoryNode) ((IStructuredSelection) getSelection()).getFirstElement();
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class GenerateDocAsHTMLAction method doRun.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
protected void doRun() {
GenerateDocAsHTMLWizard processWizard = new GenerateDocAsHTMLWizard();
IWorkbench workbench = getWorkbench();
processWizard.setWindowTitle(GENERATE_DOC_AS_HTML);
processWizard.init(workbench, (IStructuredSelection) this.getSelection());
Shell activeShell = Display.getCurrent().getActiveShell();
WizardDialog dialog = new WizardDialog(activeShell, processWizard);
dialog.open();
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class ExportItemAction method doRun.
@Override
protected void doRun() {
if (toolbarAction) {
this.setWorkbenchPart(null);
}
IRepositoryView repositoryView = getViewPart();
if (repositoryView != null && repositoryView.getViewer() instanceof TreeViewer) {
((TreeViewer) repositoryView.getViewer()).getTree().setFocus();
}
ExportItemWizard wizard = new ExportItemWizard((repositoryView != null ? repositoryView.getViewSite().getId() : null));
IWorkbench workbench = getWorkbench();
wizard.setWindowTitle(EXPORT_ITEM);
if (!toolbarAction) {
wizard.init(workbench, (IStructuredSelection) this.getSelection());
} else {
if (repositoryView != null) {
IStructuredSelection selection = (IStructuredSelection) repositoryView.getViewer().getSelection();
wizard.init(workbench, selection);
}
}
Shell activeShell = Display.getCurrent().getActiveShell();
WizardDialog dialog = new WizardDialog(activeShell, wizard);
dialog.open();
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class ExportJobScriptAction method doRun.
@Override
protected void doRun() {
JobScriptsExportWizard processWizard = new JobScriptsExportWizard();
IWorkbench workbench = getWorkbench();
processWizard.setWindowTitle(EXPORTJOBSCRIPTS);
processWizard.init(workbench, (IStructuredSelection) this.getSelection());
Shell activeShell = Display.getCurrent().getActiveShell();
WizardDialog dialog = new WizardDialog(activeShell, processWizard);
if (checkDirtyPart(workbench)) {
MessageDialog messageDialog = new //$NON-NLS-1$
MessageDialog(//$NON-NLS-1$
new Shell(), //$NON-NLS-1$
"", //$NON-NLS-1$
null, //$NON-NLS-1$
Messages.getString("ExportJobScriptAction.confirmMessage"), MessageDialog.CONFIRM, new String[] { Messages.getString("ExportJobScriptAction.confirmContiune"), IDialogConstants.CANCEL_LABEL }, //$NON-NLS-1$
0);
if (messageDialog.open() != 0) {
// don't do anything
return;
}
}
dialog.setPageSize(830, 580);
dialog.open();
// collector
IPreferenceStore preferenceStore = RepositoryPlugin.getDefault().getPreferenceStore();
int num = preferenceStore.getInt(ExportJobTokenCollector.TOS_COUNT_JOB_EXPORTS.getPrefKey());
preferenceStore.setValue(ExportJobTokenCollector.TOS_COUNT_JOB_EXPORTS.getPrefKey(), num + 1);
}
Aggregations