use of org.eclipse.jface.wizard.WizardDialog in project cubrid-manager by CUBRID.
the class SetMasterDbInfoWizard method addPages.
/**
* Add wizard pages
*/
public void addPages() {
selectDatabasePage = new SelectDatabasePage(master);
selectDatabasePage.setEditable(isEditable);
addPage(selectDatabasePage);
selectClassesPage = new SelectTablesPage(master);
selectClassesPage.setEditable(isEditable);
addPage(selectClassesPage);
WizardDialog dialog = (WizardDialog) getContainer();
dialog.addPageChangedListener(selectClassesPage);
}
use of org.eclipse.jface.wizard.WizardDialog in project cubrid-manager by CUBRID.
the class AddHostAndDbWizard method addPages.
/**
* Add wizard pages
*/
public void addPages() {
WizardDialog dialog = (WizardDialog) getContainer();
if (addedType == 0 || selectedHostNode == null || selectedHostNode.getServerInfo() == null) {
setHostInfoPage = new SetHostInfoPage(selectedHostNode, addedHostNodeList, allHostNodeList);
addPage(setHostInfoPage);
}
ServerType serverType = selectedHostNode == null || selectedHostNode.getServerInfo() == null ? null : selectedHostNode.getServerInfo().getServerType();
if (addedType == 0 || addedType == 1) {
selectDbPage = new SelectDbPage();
selectDbPage.setServerType(serverType);
addPage(selectDbPage);
dialog.addPageChangedListener(selectDbPage);
}
if (addedType == 0 || addedType == 2) {
selectBrokerPage = new SelectBrokerPage();
selectBrokerPage.setServerType(serverType);
addPage(selectBrokerPage);
dialog.addPageChangedListener(selectBrokerPage);
}
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class CreateDiagramAction method doRun.
@Override
protected void doRun() {
SimpleBusinessCreationWizard wizard = new SimpleBusinessCreationWizard(getActivePage().getWorkbenchWindow().getWorkbench(), getPath());
WizardDialog wizardDialog = new WizardDialog(new Shell(), wizard);
wizardDialog.create();
wizardDialog.open();
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class CreateProcess method doRun.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
protected void doRun() {
final NewProcessWizard processWizard;
if (isToolbar()) {
processWizard = new NewProcessWizard(null);
} else {
ISelection selection = getSelection();
if (selection == null) {
return;
}
Object obj = ((IStructuredSelection) selection).getFirstElement();
IRepositoryService service = DesignerPlugin.getDefault().getRepositoryService();
IPath path = service.getRepositoryPath((IRepositoryNode) obj);
if (RepositoryConstants.isSystemFolder(path.toString())) {
// Not allowed to create in system folder.
return;
}
processWizard = new NewProcessWizard(path);
}
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), processWizard);
if (dlg.open() == Window.OK) {
if (processWizard.getProcess() == null) {
return;
}
ProcessEditorInput fileEditorInput;
try {
// Set readonly to false since created job will always be editable.
fileEditorInput = new ProcessEditorInput(processWizard.getProcess(), false, true, false);
IRepositoryNode repositoryNode = RepositorySeekerManager.getInstance().searchRepoViewNode(fileEditorInput.getItem().getProperty().getId(), false);
fileEditorInput.setRepositoryNode(repositoryNode);
IWorkbenchPage page = getActivePage();
page.openEditor(fileEditorInput, MultiPageTalendEditor.ID, true);
// // use project setting true
// ProjectSettingManager.defaultUseProjectSetting(fileEditorInput.getLoadedProcess());
} catch (PartInitException e) {
// TODO Auto-generated catch block
ExceptionHandler.process(e);
} catch (PersistenceException e) {
MessageBoxExceptionHandler.process(e);
}
}
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class SaveAsProcessAction method run.
@Override
public void run() {
SaveAsProcessWizard processWizard = new SaveAsProcessWizard(editorPart);
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), processWizard);
if (dlg.open() == Window.OK) {
try {
// Set readonly to false since created job will always be editable.
JobEditorInput newJobEditorInput = new ProcessEditorInput(processWizard.getProcess(), true, true, false);
IWorkbenchPage page = getActivePage();
IRepositoryNode repositoryNode = RepositoryNodeUtilities.getRepositoryNode(newJobEditorInput.getItem().getProperty().getId(), false);
newJobEditorInput.setRepositoryNode(repositoryNode);
// close the old editor
page.closeEditor(((AbstractTalendEditor) this.editorPart).getParent(), false);
// open the new editor, because at the same time, there will update the jobSetting/componentSetting view
page.openEditor(newJobEditorInput, MultiPageTalendEditor.ID, true);
} catch (Exception e) {
MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "Job could not be saved" + " : " + e.getMessage());
ExceptionHandler.process(e);
}
}
}
Aggregations