protected void performUIAfterNetExecute() { ResourceExplorerView resourceExplorerView = (ResourceExplorerView) super.view; TreeViewer treeViewer = resourceExplorerView.getTreeViewer(); IEditorInput resourceEditorInput = resourceExplorerView.getResourceEditorInput(); String editor_id = resourceExplorerView.getEDITOR_ID(); if (this.items.size() == 0) { boolean expandedState = !treeViewer.getExpandedState(product); treeViewer.setExpandedState(product, expandedState); } else { IWorkbenchPage page = window.getActivePage(); IEditorPart editorPart = page.findEditor(resourceEditorInput); if (editorPart != null) { page.closeEditor(editorPart, false); } try { editorPart = page.openEditor(resourceEditorInput, editor_id); ResourceEditor resourceEditor = (ResourceEditor) editorPart; resourceEditor.showResourceFromProduct(items); } catch (PartInitException e) { MessageDialog.openError(window.getShell(), "Open resource editor error.", e.getMessage()); } } }
public GetValidItemsByProductAction(ResourceExplorerView view, Product product) { super.view = view; super.window = view.getSite().getWorkbenchWindow(); this.product = product; }