Example #1
0
 /** 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);
 }
Example #2
0
  @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;
    }
  }
Example #3
0
 @Override
 public void dispose() {
   models.dispose();
   super.dispose();
 }