Java 类com.intellij.util.ui.ErrorTreeView 实例源码

项目:intellij-ce-playground    文件:AbstractVcsHelperImpl.java   
protected void removeContents(Content notToRemove, final String tabDisplayName) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);
  Content[] contents = messageView.getContentManager().getContents();
  for (Content content : contents) {
    LOG.assertTrue(content != null);
    if (content.isPinned()) continue;
    if (tabDisplayName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:intellij-ce-playground    文件:ExecutionHelper.java   
private static void removeContents(@Nullable final Content notToRemove,
                                   @NotNull final Project myProject,
                                   @NotNull final String tabDisplayName) {
  MessageView messageView = ServiceManager.getService(myProject, MessageView.class);
  Content[] contents = messageView.getContentManager().getContents();
  for (Content content : contents) {
    LOG.assertTrue(content != null);
    if (content.isPinned()) continue;
    if (tabDisplayName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:tools-idea    文件:AbstractVcsHelperImpl.java   
protected void removeContents(Content notToRemove, final String tabDisplayName) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);
  Content[] contents = messageView.getContentManager().getContents();
  for (Content content : contents) {
    LOG.assertTrue(content != null);
    if (content.isPinned()) continue;
    if (tabDisplayName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:tools-idea    文件:ExecutionHelper.java   
private static void removeContents(@Nullable final Content notToRemove,
                                   @NotNull final Project myProject,
                                   @NotNull final String tabDisplayName) {
  MessageView messageView = ServiceManager.getService(myProject, MessageView.class);
  Content[] contents = messageView.getContentManager().getContents();
  for (Content content : contents) {
    LOG.assertTrue(content != null);
    if (content.isPinned()) continue;
    if (tabDisplayName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:consulo    文件:AbstractVcsHelperImpl.java   
protected void removeContents(Content notToRemove, final String tabDisplayName) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);
  Content[] contents = messageView.getContentManager().getContents();
  for (Content content : contents) {
    LOG.assertTrue(content != null);
    if (content.isPinned()) continue;
    if (tabDisplayName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:consulo    文件:ExecutionHelper.java   
private static void removeContents(@Nullable final Content notToRemove, @Nonnull final Project myProject, @Nonnull final String tabDisplayName) {
  MessageView messageView = ServiceManager.getService(myProject, MessageView.class);
  Content[] contents = messageView.getContentManager().getContents();
  for (Content content : contents) {
    LOG.assertTrue(content != null);
    if (content.isPinned()) continue;
    if (tabDisplayName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:intellij-ce-playground    文件:TestErrorViewAction.java   
private void addMessage(final ErrorTreeView view, final String[] message, final int type) {
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    public void run() {
      final long start = System.currentTimeMillis();
      view.addMessage(type, message, null, -1, -1, null);
      final long duration = System.currentTimeMillis() - start;
      myMillis += duration;
      incMessageCount();
    }
  }, ModalityState.NON_MODAL);
}
项目:intellij-ce-playground    文件:StdErrorReporter.java   
private void removeCompileContents(Content notToRemove) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);

  for (Content content : messageView.getContentManager().getContents()) {
    if (content.isPinned()) continue;
    if (CONTENT_NAME.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:intellij-ce-playground    文件:MessageViewHelper.java   
private void removeOldContents(Content notToRemove) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);

  for (Content content : messageView.getContentManager().getContents()) {
    if (content.isPinned()) continue;
    if (myContentName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:intellij-ce-playground    文件:CvsOperationExecutor.java   
protected void showErrors(final CvsHandler handler, final CvsTabbedWindow tabbedWindow) {
  final List<VcsException> errors = handler.getErrorsExceptAborted();
  if (!myShowErrors || myIsQuietOperation) return;
  if (tabbedWindow == null) {
    if (errors.isEmpty()) return;
    final List<String> messages = new ArrayList<String>();
    for (VcsException error : errors) {
      if (! StringUtil.isEmptyOrSpaces(error.getMessage())) {
        messages.add(error.getMessage());
      }
    }
    final String errorMessage = StringUtil.join(messages, "\n");
    Messages.showErrorDialog(errorMessage, "CVS Error");
    return;
  }
  if (!errors.isEmpty()) {
    ErrorTreeView errorTreeView = tabbedWindow.getErrorsTreeView();
    for (final VcsException exception : errors) {
      final String groupName = DateFormatUtil.formatDateTime(System.currentTimeMillis()) + ' ' + handler.getTitle();
      if (exception.isWarning()) {
        errorTreeView.addMessage(MessageCategory.WARNING, exception.getMessages(), groupName, NonNavigatable.INSTANCE,
                                 null, null, exception);
      } else {
        errorTreeView.addMessage(MessageCategory.ERROR, exception.getMessages(), groupName, NonNavigatable.INSTANCE,
                                 null, null, exception);
      }
    }
  }
}
项目:intellij-ce-playground    文件:CvsTabbedWindow.java   
public ErrorTreeView getErrorsTreeView() {
  if (myErrorsView == null) {
    myErrorsView = ErrorViewFactory.SERVICE.getInstance()
      .createErrorTreeView(myProject, null, true, new AnAction[]{(DefaultActionGroup)ActionManager.getInstance().getAction("CvsActions")},
                           new AnAction[]{new GlobalCvsSettingsAction(), new ReconfigureCvsRootAction()}, new ContentManagerProvider() {
        public ContentManager getParentContent() {
          return getToolWindow().getContentManager();
        }
      });
    addTab(CvsBundle.message("tab.title.errors"), myErrorsView.getComponent(), true, false, true, false, null, "cvs.errors");
  }
  getToolWindow().activate(null, false);
  return myErrorsView;
}
项目:tools-idea    文件:TestErrorViewAction.java   
private void addMessage(final ErrorTreeView view, final String[] message, final int type) {
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    public void run() {
      final long start = System.currentTimeMillis();
      view.addMessage(type, message, null, -1, -1, null);
      final long duration = System.currentTimeMillis() - start;
      myMillis += duration;
      incMessageCount();
    }
  }, ModalityState.NON_MODAL);
}
项目:tools-idea    文件:StdErrorReporter.java   
private void removeCompileContents(Content notToRemove) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);

  for (Content content : messageView.getContentManager().getContents()) {
    if (content.isPinned()) continue;
    if (CONTENT_NAME.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:tools-idea    文件:MessageViewHelper.java   
private void removeOldContents(Content notToRemove) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);

  for (Content content : messageView.getContentManager().getContents()) {
    if (content.isPinned()) continue;
    if (myContentName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:tools-idea    文件:CvsOperationExecutor.java   
protected void showErrors(final CvsHandler handler, final CvsTabbedWindow tabbedWindow) {
  final List<VcsException> errors = handler.getErrorsExceptAborted();
  if (!myShowErrors || myIsQuietOperation) return;
  if (tabbedWindow == null) {
    if (errors.isEmpty()) return;
    final List<String> messages = new ArrayList<String>();
    for (VcsException error : errors) {
      if (! StringUtil.isEmptyOrSpaces(error.getMessage())) {
        messages.add(error.getMessage());
      }
    }
    final String errorMessage = StringUtil.join(messages, "\n");
    Messages.showErrorDialog(errorMessage, "CVS Error");
    return;
  }
  if (errors.isEmpty()) {
    tabbedWindow.hideErrors();
  }
  else {
    ErrorTreeView errorTreeView = tabbedWindow.getErrorsTreeView();
    for (final VcsException exception : errors) {
      final String groupName = DateFormatUtil.formatDateTime(System.currentTimeMillis()) + ' ' + handler.getTitle();
      if (exception.isWarning()) {
        errorTreeView.addMessage(MessageCategory.WARNING, exception.getMessages(), groupName, DummyNavigatable.INSTANCE,
                                 null, null, exception);
      } else {
        errorTreeView.addMessage(MessageCategory.ERROR, exception.getMessages(), groupName, DummyNavigatable.INSTANCE,
                                 null, null, exception);
      }
    }
    tabbedWindow.ensureVisible(myProject);
  }
}
项目:tools-idea    文件:CvsTabbedWindow.java   
public ErrorTreeView getErrorsTreeView() {
  if (myErrorsView == null) {
    myErrorsView = ErrorViewFactory.SERVICE.getInstance()
      .createErrorTreeView(myProject, null, true, new AnAction[]{(DefaultActionGroup)ActionManager.getInstance().getAction("CvsActions")},
                           new AnAction[]{new GlobalCvsSettingsAction(), new ReconfigureCvsRootAction()}, new ContentManagerProvider() {
        public ContentManager getParentContent() {
          return getContentManager();
        }
      });
    addTab(CvsBundle.message("tab.title.errors"), myErrorsView.getComponent(), true, false, true, false, null, "cvs.errors");
  }
  return myErrorsView;
}
项目:consulo    文件:TestErrorViewAction.java   
private void addMessage(final ErrorTreeView view, final String[] message, final int type) {
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    public void run() {
      final long start = System.currentTimeMillis();
      view.addMessage(type, message, null, -1, -1, null);
      final long duration = System.currentTimeMillis() - start;
      myMillis += duration;
      incMessageCount();
    }
  }, ModalityState.NON_MODAL);
}
项目:consulo-xml    文件:MessageViewHelper.java   
private void removeOldContents(Content notToRemove) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);

  for (Content content : messageView.getContentManager().getContents()) {
    if (content.isPinned()) continue;
    if (myContentName.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:consulo-xml    文件:StdErrorReporter.java   
private void removeCompileContents(Content notToRemove) {
  MessageView messageView = MessageView.SERVICE.getInstance(myProject);

  for (Content content : messageView.getContentManager().getContents()) {
    if (content.isPinned()) continue;
    if (CONTENT_NAME.equals(content.getDisplayName()) && content != notToRemove) {
      ErrorTreeView listErrorView = (ErrorTreeView)content.getComponent();
      if (listErrorView != null) {
        if (messageView.getContentManager().removeContent(content, true)) {
          content.release();
        }
      }
    }
  }
}
项目:intellij-ce-playground    文件:ErrorViewFactory.java   
ErrorTreeView createErrorTreeView(Project project, @Nullable String helpId, boolean createExitAction, AnAction[] extraPopupMenuActions,
AnAction[] extraRightToolbarGroupActions, ContentManagerProvider contentManagerProvider);
项目:intellij-ce-playground    文件:TestNewErrorViewAction.java   
protected ErrorTreeView createView(Project project) {
  return new NewErrorTreeViewPanel(project, null);
}
项目:intellij-ce-playground    文件:CvsTabbedWindow.java   
public void update(AnActionEvent e) {
  super.update(e);
  Object data = ErrorTreeView.CURRENT_EXCEPTION_DATA_KEY.getData(e.getDataContext());
  e.getPresentation().setEnabled(data instanceof CvsException);
}
项目:intellij-ce-playground    文件:CvsTabbedWindow.java   
public void actionPerformed(AnActionEvent e) {
  Object data = ErrorTreeView.CURRENT_EXCEPTION_DATA_KEY.getData(e.getDataContext());
  CvsConfigurationsListEditor.reconfigureCvsRoot(((CvsException)data).getCvsRoot(), myProject);
}
项目:tools-idea    文件:ErrorViewFactory.java   
ErrorTreeView createErrorTreeView(Project project, @Nullable String helpId, boolean createExitAction, AnAction[] extraPopupMenuActions,
AnAction[] extraRightToolbarGroupActions, ContentManagerProvider contentManagerProvider);
项目:tools-idea    文件:TestNewErrorViewAction.java   
protected ErrorTreeView createView(Project project) {
  return new NewErrorTreeViewPanel(project, null);
}
项目:tools-idea    文件:CvsTabbedWindow.java   
public void update(AnActionEvent e) {
  super.update(e);
  Object data = ErrorTreeView.CURRENT_EXCEPTION_DATA_KEY.getData(e.getDataContext());
  e.getPresentation().setEnabled(data instanceof CvsException);

}
项目:tools-idea    文件:CvsTabbedWindow.java   
public void actionPerformed(AnActionEvent e) {
  Object data = ErrorTreeView.CURRENT_EXCEPTION_DATA_KEY.getData(e.getDataContext());
  CvsConfigurationsListEditor.reconfigureCvsRoot(((CvsException)data).getCvsRoot(), myProject);
}
项目:consulo    文件:TestNewErrorViewAction.java   
protected ErrorTreeView createView(Project project) {
  return new NewErrorTreeViewPanel(project, null);
}
项目:intellij-ce-playground    文件:TestErrorViewAction.java   
protected abstract ErrorTreeView createView(Project project);
项目:tools-idea    文件:TestErrorViewAction.java   
protected abstract ErrorTreeView createView(Project project);
项目:consulo    文件:TestErrorViewAction.java   
protected abstract ErrorTreeView createView(Project project);