use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class CreateSqlpatternAction method doRun.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
protected void doRun() {
RepositoryNode sqlPatternNode = null;
if (!isFromSqlPatternComposite) {
sqlPatternNode = getCurrentRepositoryNode();
}
if (isToolbar()) {
if (sqlPatternNode != null && sqlPatternNode.getContentType() != ERepositoryObjectType.SQLPATTERNS) {
sqlPatternNode = null;
}
if (sqlPatternNode == null) {
sqlPatternNode = getRepositoryNodeForDefault(ERepositoryObjectType.SQLPATTERNS);
}
}
RepositoryNode node = null;
IPath path;
if (this.sqlPatternPath != null) {
path = new Path(this.sqlPatternPath);
} else if (isToolbar()) {
path = RepositoryNodeUtilities.getPath(sqlPatternNode);
} else {
ISelection selection = getSelection();
Object obj = ((IStructuredSelection) selection).getFirstElement();
node = (RepositoryNode) obj;
path = RepositoryNodeUtilities.getPath(node);
}
NewSqlpatternWizard routineWizard = new NewSqlpatternWizard(path);
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), routineWizard);
if (dlg.open() == Window.OK) {
try {
openSQLPatternEditor(routineWizard.getSQLPattern(), false);
} catch (PartInitException e) {
MessageBoxExceptionHandler.process(e);
} catch (SystemException e) {
MessageBoxExceptionHandler.process(e);
}
}
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class ConfigRoutineLibraryAction method doRun.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
protected void doRun() {
ConfigExternalLibWizard wizard = new ConfigExternalLibWizard();
IWorkbench workbench = getWorkbench();
wizard.init(workbench, (IStructuredSelection) getSelection());
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 EditContextAction method doRun.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
protected void doRun() {
if (repositoryNode == null) {
repositoryNode = getCurrentRepositoryNode();
}
ContextWizard contextWizard = new ContextWizard(PlatformUI.getWorkbench(), false, repositoryNode, false);
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), contextWizard);
dlg.open();
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class ReadContextAction method doRun.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
protected void doRun() {
if (repositoryNode == null) {
repositoryNode = getCurrentRepositoryNode();
}
ContextWizard contextWizard = new ContextWizard(PlatformUI.getWorkbench(), false, repositoryNode, true);
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), contextWizard);
dlg.open();
RepositoryNode node = (RepositoryNode) ((IStructuredSelection) getSelection()).getFirstElement();
refresh(node);
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class OpenExistVersionProcessAction method doRun.
@Override
protected void doRun() {
ISelection selection = getSelection();
Object obj = ((IStructuredSelection) selection).getFirstElement();
RepositoryNode node = (RepositoryNode) obj;
IPath path = RepositoryNodeUtilities.getPath(node);
String originalName = node.getObject().getLabel();
RepositoryObject repositoryObj = new RepositoryObject(node.getObject().getProperty());
repositoryObj.setRepositoryNode(node.getObject().getRepositoryNode());
OpenExistVersionProcessWizard wizard = new OpenExistVersionProcessWizard(repositoryObj);
WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
dialog.setPageSize(300, 250);
//$NON-NLS-1$
dialog.setTitle(Messages.getString("OpenExistVersionProcess.open.dialog"));
if (dialog.open() == Dialog.OK) {
refresh(node);
// refresh the corresponding editor's name
IEditorPart part = getCorrespondingEditor(node);
if (part != null && part instanceof IUIRefresher) {
((IUIRefresher) part).refreshName();
} else {
processRoutineRenameOperation(originalName, node, path);
}
}
}
Aggregations