@Override public void execute(IAction arg0) { WorkbenchPart workbench = YRCDesktopUI.getCurrentPart(); workbench.setFocus(); Element eInput = YRCXmlUtils.createDocument("SearchCriteria").getDocumentElement(); YRCXmlUtils.setAttribute(eInput, "ReferenceOrderSearchEditorKey", System.currentTimeMillis()); YRCEditorInput editorInput = null; editorInput = new YRCEditorInput(eInput, new String[] {""}, ""); boolean b = YRCPlatformUI.openEditor(XPXRefOrderSearchEditor.ID_EDITOR, editorInput); }
@Override public void showBusy(boolean busy) { if (editorBusyIndicator != null) { if (busy) { if (TasksUiInternal.isAnimationsEnabled()) { editorBusyIndicator.start(); } } else { editorBusyIndicator.stop(); } } if (!isHeaderFormDisposed()) { Form form = getHeaderForm().getForm().getForm(); if (form != null && !form.isDisposed()) { // TODO consider only disabling certain actions IToolBarManager toolBarManager = form.getToolBarManager(); if (toolBarManager instanceof ToolBarManager) { ToolBar control = ((ToolBarManager) toolBarManager).getControl(); if (control != null) { control.setEnabled(!busy); } } if (leftToolBar != null) { leftToolBar.setEnabled(!busy); } if (titleLabel != null) { titleLabel.setEnabled(!busy); } CommonUiUtil.setEnabled(form.getBody(), !busy); for (IFormPage page : getPages()) { if (page instanceof WorkbenchPart) { WorkbenchPart part = (WorkbenchPart) page; part.showBusy(busy); } } } } }