use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class CreateGenericConnectionAction method doRun.
@Override
protected void doRun() {
IWizard wizard = new GenericConnWizard(PlatformUI.getWorkbench(), creation, repositoryNode, getExistingNames());
WizardDialog wizardDialog = new GenericWizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard, new GenericWizardInternalService().getComponentService());
if (Platform.getOS().equals(Platform.OS_LINUX)) {
wizardDialog.setPageSize(getWizardWidth(), getWizardHeight() + 80);
}
wizardDialog.create();
wizardDialog.open();
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class ImportDemoItemAction method doRun.
@Override
protected void doRun() {
if (ProxyRepositoryFactory.getInstance().isUserReadOnlyOnCurrentProject()) {
return;
}
// qli modified to fix the bug "6999".
IRepositoryView repositoryView = RepositoryManagerHelper.findRepositoryView();
if (repositoryView != null && repositoryView.getViewer() instanceof TreeViewer) {
((TreeViewer) repositoryView.getViewer()).getTree().setFocus();
}
ISelection selection = this.getSelection();
RepositoryNode rNode = null;
if (toolbarAction) {
if (repositoryView != null) {
selection = repositoryView.getViewer().getSelection();
}
} else if ((selection instanceof IStructuredSelection) && (((IStructuredSelection) selection).getFirstElement() instanceof RepositoryNode)) {
Object o = ((IStructuredSelection) selection).getFirstElement();
if (o instanceof RepositoryNode) {
rNode = (RepositoryNode) o;
}
}
final List<DemoProjectBean> demoProjectList = ImportProjectsUtilities.getAllDemoProjects();
ImportDemoProjectItemsWizard wizard = new ImportDemoProjectItemsWizard(demoProjectList);
wizard.setWindowTitle(IMPORT_DEMO);
wizard.init(PlatformUI.getWorkbench(), (IStructuredSelection) 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 ImportDemoProjectPage method prefromFinish.
public boolean prefromFinish() {
final DemoProjectBean selectPro = this.demoProjectList.get(selectedDemoProjectIndex);
NewImportProjectWizard newPrjWiz = new NewImportProjectWizard();
WizardDialog newProjectDialog = new WizardDialog(getShell(), newPrjWiz);
//$NON-NLS-1$
newProjectDialog.setTitle(Messages.getString("NewImportProjectWizard.windowTitle"));
if (newProjectDialog.open() == Window.OK) {
projectName = newPrjWiz.getName().trim().replace(' ', '_');
// final String demoProjName = selectPro.getProjectName();
//
ProgressDialog progressDialog = new ProgressDialog(getShell()) {
private IProgressMonitor monitorWrap;
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
monitorWrap = new EventLoopProgressMonitor(monitor);
try {
// }
if (null == selectPro) {
//$NON-NLS-1$
throw new IOException("cannot find selected demo project");
}
ImportProjectsUtilities.importDemoProject(getShell(), projectName, selectPro, monitor);
} catch (Exception e1) {
projectName = null;
throw new InvocationTargetException(e1);
}
monitorWrap.done();
}
};
try {
progressDialog.executeProcess();
} catch (InvocationTargetException e1) {
projectName = null;
MessageBoxExceptionHandler.process(e1.getTargetException(), getShell());
} catch (InterruptedException e1) {
projectName = null;
}
}
return true;
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class ImportProjectsAction method run.
public void run() {
ExternalProjectImportWizard processWizard = new TalendExternalProjectImportWizard();
// Set the "Copy projects into workspace" value default as true:
IDialogSettings dialogSettings = processWizard.getDialogSettings();
if (dialogSettings.get(STORE_COPY_PROJECT) == null) {
dialogSettings.put(STORE_COPY_PROJECT, true);
}
Shell activeShell = Display.getCurrent().getActiveShell();
WizardDialog dialog = new WizardDialog(activeShell, processWizard);
processWizard.setWindowTitle(ACTION_TITLE);
dialog.create();
dialog.open();
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class ExportProjectsAsAction method run.
@Override
public void run() {
// Refresh Navigator view before export operation, see bug 4595
Job job = new //$NON-NLS-1$
Job(//$NON-NLS-1$
Messages.getString("ExportCommandAction.refreshWorkspace")) {
@Override
protected IStatus run(IProgressMonitor monitor) {
monitor.beginTask(ExportProjectsAsAction.this.getToolTipText(), IProgressMonitor.UNKNOWN);
try {
ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
e.printStackTrace();
}
monitor.done();
return Status.OK_STATUS;
}
};
job.setUser(true);
job.setPriority(Job.BUILD);
job.schedule();
initializeExternalLibraries();
Shell activeShell = Display.getCurrent().getActiveShell();
TalendZipFileExportWizard docWizard = new TalendZipFileExportWizard();
WizardDialog dialog = new WizardDialog(activeShell, docWizard);
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
if (brandingService.isPoweredbyTalend()) {
//$NON-NLS-1$
docWizard.setWindowTitle(Messages.getString("ExportProjectsAsAction.actionTitle"));
} else {
docWizard.setWindowTitle(Messages.getString("ExportProjectsAsAction.actionTitleForOthers", //$NON-NLS-1$
brandingService.getShortProductName()));
}
dialog.create();
dialog.open();
clearExternalLibraries();
}
Aggregations