Ejemplo n.º 1
0
  private void refreshView() {
    if (getContextManager() == null) {
      // this.setEnabled(false);
      tableNebulas.setEnabled(isReadOnly());
    } else {
      this.setEnabled(true);
      setTabEnable(!isReadOnly());
      toolgeRefreshContextRelitiveComposite(tableNebulas);
    }

    if (getContextManager() != null) {
      getContextManager().fireContextsChangedEvent();
    }
  }
Ejemplo n.º 2
0
  public void setTabEnable(boolean enable) {

    boolean flag = false;
    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    if (page != null) {
      if (page.getActiveEditor() instanceof MultiPageEditorPart) {
        MultiPageEditorPart editor = (MultiPageEditorPart) page.getActiveEditor();
        if (editor != null) {
          if (editor.getActivePage() == PAGE) {
            flag = true;
          }
        }
      }
    }
    if (enable) {
      tableNebulas.setEnabled(true);
    }
  }