use of org.eclipse.ui.IWorkbench in project tdi-studio-se by Talend.
the class ShowEditorPageAction method run.
@Override
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
IEditorPart editorPart = page.getActiveEditor();
if (editorPart instanceof MultiPageTalendEditor) {
((MultiPageTalendEditor) editorPart).showCodePage();
}
}
use of org.eclipse.ui.IWorkbench in project tdi-studio-se by Talend.
the class ShowJobSettingsViewAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
try {
page.showView(getViewId());
JobSettingsView view = (JobSettingsView) page.findView(getViewId());
IDiagramModelService service = CorePlugin.getDefault().getDiagramModelService();
ISelection selection = service.getBusinessEditorSelection(page.getActiveEditor());
if (selection instanceof IStructuredSelection) {
Object firstElement = ((IStructuredSelection) selection).getFirstElement();
if (firstElement != null) {
BusinessType type = service.getBusinessModelType(firstElement);
if (type == BusinessType.CONNECTION || type == BusinessType.NOTE || type == BusinessType.SHAP) {
view.refresh(false, firstElement);
} else if (type == BusinessType.PROCESS || service.isInstanceOfCompartmentEditPart(firstElement)) {
view.refresh(false, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor());
}
}
}
} catch (PartInitException e) {
// e.printStackTrace();
ExceptionHandler.process(e);
}
}
use of org.eclipse.ui.IWorkbench 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.ui.IWorkbench in project tdi-studio-se by Talend.
the class RunProcessAction method run.
@Override
public void run() {
if ((ProcessComposite.getProcessContext() != null && !ProcessComposite.getProcessContext().isRunning())) {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
// TODO SML Use getInstance
ShowRunProcessViewAction action = new ShowRunProcessViewAction();
action.run();
// TODO SML Optimize
ProcessView view = (ProcessView) page.getActivePart();
view.runAction.run();
}
}
use of org.eclipse.ui.IWorkbench in project tdi-studio-se by Talend.
the class RunProcessShortcutAction method run.
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
IEditorPart activeEditor = page.getActiveEditor();
if (CorePlugin.getDefault().getDesignerCoreService().isTalendEditor(activeEditor)) {
JobLaunchShortcutManager.run(activeEditor);
} else {
new RunProcessAction().run();
}
}
Aggregations