MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
}
}
+
+ public static void setMarker(IFile file,
+ String message,
+ int charStart,
+ int charEnd,
+ int errorLevel,
+ String location)
+ throws CoreException {
+ if (file != null) {
+ Hashtable attributes = new Hashtable();
+ MarkerUtilities.setMessage(attributes, message);
+ switch (errorLevel) {
+ case Parser.ERROR :
+ attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
+ break;
+ case Parser.WARNING :
+ attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
+ break;
+ case Parser.INFO :
+ attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
+ break;
+ }
+ attributes.put(IMarker.LOCATION,location);
+ MarkerUtilities.setCharStart(attributes, charStart);
+ MarkerUtilities.setCharEnd(attributes, charEnd);
+ // setLineNumber(attributes, lineNumber);
+ MarkerUtilities.createMarker(file, attributes, IMarker.PROBLEM);
+ }
+ }
}