private void addBuildMarkers(String message, int severity) throws Exception {
Location location = model != null ? model.getLocation(message) : null;
if (location != null) {
String type = location.details != null ? location.details.getClass().getName() : null;
BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(type);
List<MarkerData> markers = handler.generateMarkerData(getProject(), model, location);
for (MarkerData markerData : markers) {
IMarker marker = markerData.getResource().createMarker(BndtoolsConstants.MARKER_BND_PROBLEM);
marker.setAttribute(IMarker.SEVERITY, severity);
marker.setAttribute("$bndType", type);
marker.setAttribute(BuildErrorDetailsHandler.PROP_HAS_RESOLUTIONS, markerData.hasResolutions());