Java 类org.eclipse.ui.views.markers.MarkerItem 实例源码

项目:gama    文件:GamlDescriptionMarkerField.java   
@Override
public void update(final ViewerCell cell) {
    final MarkerItem item = (MarkerItem) cell.getElement();
    Image image = null;
    if (item.getMarker() == null) {
        image = GamlMarkerImageProvider.getImage(item.getAttributeValue(IMarker.MESSAGE, "")).image();
    } else {
        try {
            if (item.getMarker().isSubtypeOf(IMarker.TASK)) {
                image = GamlMarkerImageProvider.getImage(-1).image();
            } else {
                image = GamlMarkerImageProvider
                        .getImage(item.getMarker().getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING))
                        .image();
            }
        } catch (final CoreException e) {
            // e.printStackTrace();
        }
    }

    cell.setText(getValue(item));
    cell.setImage(image);
}
项目:testability-explorer    文件:TestabilityResourceMarkerField.java   
@Override
public String getValue(MarkerItem item) {
  IMarker marker = item.getMarker();
  if (marker != null) {
    IResource resource = marker.getResource();
    String name = resource.getName();
    return name;
  }
  return null;
}
项目:git-appraise-eclipse    文件:Resolved.java   
@Override
public String getValue(MarkerItem item) {
  String result =
      item.getAttributeValue(ReviewMarkerAttributes.REVIEW_RESOLVED_MARKER_ATTRIBUTE, "");
  if ("true".equals(result)) {
    return "yes";
  }
  return "";
}
项目:git-appraise-eclipse    文件:DateTime.java   
@Override
public String getValue(MarkerItem item) {
  String value =
      item.getAttributeValue(ReviewMarkerAttributes.REVIEW_DATETIME_MARKER_ATTRIBUTE, "");
  if (!value.isEmpty()) {
    DateFormat df = DateFormat.getDateTimeInstance();
    return df.format(Long.parseLong(value));
  }
  return "Unknown";
}
项目:testability-explorer    文件:TestabilityDescriptionMarkerField.java   
@Override
public String getValue(MarkerItem item) {
  return item.getAttributeValue(IMarker.MESSAGE, "");
}
项目:testability-explorer    文件:TestabilityLineNumberMarkerField.java   
@Override
public String getValue(MarkerItem item) {
  return item.getAttributeValue(IMarker.LINE_NUMBER, "");
}
项目:testability-explorer    文件:TestabilityIssueTypeMarkerField.java   
@Override
public String getValue(MarkerItem item) {
  return item.getAttributeValue(TestabilityConstants.ISSUE_TYPE, "");
}
项目:testability-explorer    文件:TestabilityPathMarkerField.java   
@Override
public String getValue(MarkerItem item) {
  return item.getPath();
}
项目:git-appraise-eclipse    文件:Author.java   
@Override
public String getValue(MarkerItem item) {
  return item.getAttributeValue(ReviewMarkerAttributes.REVIEW_AUTHOR_MARKER_ATTRIBUTE, "Unknown");
}
项目:RCP-Demo-Application    文件:MyMarkerField.java   
@Override
public String getValue(MarkerItem item) {
    return "Test";
    //return item.getMarker().getResource().getProject().getName();  
}