Java Code Examples for com.intellij.util.ui.MessageCategory#WARNING

The following examples show how to use com.intellij.util.ui.MessageCategory#WARNING . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlazeProblemsView.java    From intellij with Apache License 2.0 6 votes vote down vote up
private static int translateCategory(IssueOutput.Category category) {
  switch (category) {
    case ERROR:
      return MessageCategory.ERROR;
    case WARNING:
      return MessageCategory.WARNING;
    case NOTE:
      return MessageCategory.NOTE;
    case STATISTICS:
      return MessageCategory.STATISTICS;
    case INFORMATION:
      return MessageCategory.INFORMATION;
    default:
      logger.error("Unknown message category: " + category);
      return 0;
  }
}
 
Example 2
Source File: CompileContextImpl.java    From consulo with Apache License 2.0 6 votes vote down vote up
private static int translateCategory(CompilerMessageCategory category) {
  if (CompilerMessageCategory.ERROR.equals(category)) {
    return MessageCategory.ERROR;
  }
  if (CompilerMessageCategory.WARNING.equals(category)) {
    return MessageCategory.WARNING;
  }
  if (CompilerMessageCategory.STATISTICS.equals(category)) {
    return MessageCategory.STATISTICS;
  }
  if (CompilerMessageCategory.INFORMATION.equals(category)) {
    return MessageCategory.INFORMATION;
  }
  LOG.error("Unknown message category: " + category);
  return 0;
}
 
Example 3
Source File: AbstractVcsHelperImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
private static int getErrorCategory(VcsException exception) {
  if (exception.isWarning()) {
    return MessageCategory.WARNING;
  }
  else {
    return MessageCategory.ERROR;
  }
}