コード例 #1
0
 public void dispose() {
   if (isComponentCreated()) {
     removeListeners();
   }
   myDisposed = true;
   super.dispose();
 }
コード例 #2
0
  private static void patchProjectAreaExtensions(@NotNull final Project project) {
    ExtensionsArea projectArea = Extensions.getArea(project);

    for (SelectInTarget target : Extensions.getExtensions(SelectInTarget.EP_NAME, project)) {
      if (ToolWindowId.FAVORITES_VIEW.equals(target.getToolWindowId())
          || ToolWindowId.STRUCTURE_VIEW.equals(target.getToolWindowId())) {
        projectArea.getExtensionPoint(SelectInTarget.EP_NAME).unregisterExtension(target);
      }
    }

    for (AbstractProjectViewPane pane :
        Extensions.getExtensions(AbstractProjectViewPane.EP_NAME, project)) {
      if (pane.getId().equals(ScopeViewPane.ID)) {
        Disposer.dispose(pane);
        projectArea.getExtensionPoint(AbstractProjectViewPane.EP_NAME).unregisterExtension(pane);
      }
    }
  }
コード例 #3
0
  private static void patchProjectAreaExtensions(@NotNull final Project project) {
    Executor debugExecutor = DefaultDebugExecutor.getDebugExecutorInstance();
    unregisterAction(debugExecutor.getId(), ExecutorRegistryImpl.RUNNERS_GROUP);
    unregisterAction(debugExecutor.getContextActionId(), ExecutorRegistryImpl.RUN_CONTEXT_GROUP);

    ExtensionsArea projectArea = Extensions.getArea(project);

    for (SelectInTarget target : Extensions.getExtensions(SelectInTarget.EP_NAME, project)) {
      if (ToolWindowId.FAVORITES_VIEW.equals(target.getToolWindowId())
          || ToolWindowId.STRUCTURE_VIEW.equals(target.getToolWindowId())) {
        projectArea.getExtensionPoint(SelectInTarget.EP_NAME).unregisterExtension(target);
      }
    }

    for (AbstractProjectViewPane pane :
        Extensions.getExtensions(AbstractProjectViewPane.EP_NAME, project)) {
      if (pane.getId().equals(ScopeViewPane.ID)) {
        Disposer.dispose(pane);
        projectArea.getExtensionPoint(AbstractProjectViewPane.EP_NAME).unregisterExtension(pane);
      }
    }
  }
コード例 #4
0
ファイル: CreateRootNodeGroup.java プロジェクト: sprig/MPS
    private boolean trySelectInCurrentPane(final SNode node) {
      final ProjectView projectView = ProjectView.getInstance(myProject);

      AbstractProjectViewPane selectedPane = projectView.getCurrentProjectViewPane();
      if (selectedPane == null) return false;

      SelectInTarget target = selectedPane.createSelectInTarget();
      if (target == null) return false;

      SNodeReference pointer =
          ModelAccess.instance()
              .runReadAction(
                  new Computable<SNodeReference>() {
                    @Override
                    public SNodeReference compute() {
                      return new jetbrains.mps.smodel.SNodePointer(node);
                    }
                  });
      MySelectInContext context = new MySelectInContext(pointer);
      if (!target.canSelect(context)) return false;

      target.selectIn(context, false);
      return true;
    }
コード例 #5
0
 @Override
 public void addToolbarActions(DefaultActionGroup actionGroup) {
   super.addToolbarActions(actionGroup);
 }