Exemplo n.º 1
0
 private boolean isOurContentPaneShowing() {
   if (myToolWindowManager.isToolWindowRegistered(TOOLWINDOW_ID) && myToolWindow.isVisible()) {
     Content content = myToolWindow.getContentManager().getSelectedContent();
     return content != null && content.getTabName().equals(VcsLogContentProvider.TAB_NAME);
   }
   return false;
 }
Exemplo n.º 2
0
    public PostponeableLogRefresher(
        @NotNull Project project, @NotNull VcsLogDataHolder dataHolder) {
      myDataHolder = dataHolder;
      myToolWindowManager = (ToolWindowManagerImpl) ToolWindowManager.getInstance(project);
      myToolWindow = (ToolWindowImpl) myToolWindowManager.getToolWindow(TOOLWINDOW_ID);

      Disposer.register(myToolWindow.getContentManager(), this);

      myPostponedEventsListener = new MyRefreshPostponedEventsListener();
      myToolWindow.getContentManager().addContentManagerListener(myPostponedEventsListener);
      myToolWindowManager.addToolWindowManagerListener(myPostponedEventsListener);
    }
Exemplo n.º 3
0
  @Nullable
  public static ToolWindow ensureToolWindowContentInitialized(
      @NotNull Project project, @NotNull ProjectSystemId externalSystemId) {
    final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
    if (toolWindowManager == null) return null;

    final ToolWindow toolWindow =
        toolWindowManager.getToolWindow(externalSystemId.getReadableName());
    if (toolWindow == null) return null;

    if (toolWindow instanceof ToolWindowImpl) {
      ((ToolWindowImpl) toolWindow).ensureContentInitialized();
    }
    return toolWindow;
  }
Exemplo n.º 4
0
 @Override
 public void dispose() {
   myToolWindow.getContentManager().removeContentManagerListener(myPostponedEventsListener);
   myToolWindowManager.removeToolWindowManagerListener(myPostponedEventsListener);
 }