Java Code Examples for com.google.gwt.core.ext.TreeLogger.Type#ERROR

The following examples show how to use com.google.gwt.core.ext.TreeLogger.Type#ERROR . 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: ModelLabelProvider.java    From gwt-eclipse-plugin with Eclipse Public License 1.0 6 votes vote down vote up
private Image getBrowserTabImage(BrowserTab browserTab) {
  String imageId = DevModeImages.WEB_BROWSER;
  if (browserTab.isTerminated()) {
    imageId = DevModeImages.WEB_BROWSER_TERMINATED;
  } else {
    String attentionLevel = browserTab.getNeedsAttentionLevel();
    if (attentionLevel != null) {
      Type logLevel = LogEntry.toTreeLoggerType(attentionLevel);
      if (logLevel == Type.ERROR) {
        imageId = DevModeImages.WEB_BROWSER_ERROR;
      } else if (logLevel == Type.WARN) {
        imageId = DevModeImages.WEB_BROWSER_WARNING;
      }
    }
  }

  return Activator.getDefault().getImage(imageId);
}
 
Example 2
Source File: ModelLabelProvider.java    From gwt-eclipse-plugin with Eclipse Public License 1.0 6 votes vote down vote up
private Image getLaunchConfigurationImage(LaunchConfiguration launchConfiguration) {
  String launchConfigType = launchConfiguration.getLaunchTypeId();
  String imageId = DevModeImages.GDT_ICON;

  if (launchConfiguration.isTerminated()) {
    imageId = DevModeImages.GDT_ICON_TERMINATED;
  } else {
    String attentionLevel = launchConfiguration.getNeedsAttentionLevel();
    if (attentionLevel != null) {
      Type logLevel = LogEntry.toTreeLoggerType(attentionLevel);
      if (logLevel == Type.ERROR) {
        imageId = DevModeImages.GDT_ICON_ERROR;
      } else if (logLevel == Type.WARN) {
        imageId = DevModeImages.GDT_ICON_WARNING;
      }
    }
  }

  return Activator.getDefault().getImage(imageId);
}