/** Check that the input is an instance of <code>IFileEditorInput</code>. */ @Override public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException { if (!(editorInput instanceof IFileEditorInput)) throw new PartInitException("Invalid Input: Must be IFileEditorInput"); super.init(site, editorInput); getSite().setSelectionProvider(selections); }
@Override public void doRefresh() { if (guard) return; guard = true; try { if (outline != null && outline.getSelection().isEmpty()) { TreePath root = new TreePath(new Object[] {getTree().getRoot()}); outline.setSelection(new TreeSelection(root)); outline.getTreeViewer().setExpandedState(root, true); } super.doRefresh(); } finally { guard = false; } }
@Override public void dispose() { models.dispose(); super.dispose(); }