protected void setMarkerAttributes(Issue issue, IResource resource, IMarker marker) throws CoreException {
String lineNR = "";
if (issue.getLineNumber() != null) {
lineNR = "line: " + issue.getLineNumber() + " ";
}
marker.setAttribute(IMarker.LOCATION, lineNR + resource.getFullPath().toString());
marker.setAttribute(Issue.CODE_KEY, issue.getCode());
marker.setAttribute(IMarker.SEVERITY, getSeverity(issue));
marker.setAttribute(IMarker.CHAR_START, issue.getOffset());
if(issue.getOffset() != null && issue.getLength() != null)
marker.setAttribute(IMarker.CHAR_END, issue.getOffset()+issue.getLength());
marker.setAttribute(IMarker.LINE_NUMBER, issue.getLineNumber());
marker.setAttribute(IMarker.MESSAGE, issue.getMessage());
if (issue.getUriToProblem()!=null)
marker.setAttribute(Issue.URI_KEY, issue.getUriToProblem().toString());
if(issue.getData() != null && issue.getData().length > 0) {
marker.setAttribute(Issue.DATA_KEY, Strings.pack(issue.getData()));
}
if (resolutionProvider != null && resolutionProvider.hasResolutionFor(issue.getCode())) {
marker.setAttribute(FIXABLE_KEY, true);
}
}