1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 15:05:36 +02:00

convinience methods to manipulate marker attributes

This commit is contained in:
Alena Laskavaia 2010-07-22 01:48:51 +00:00
parent ec4b080977
commit a4a8abe72d

View file

@ -176,4 +176,30 @@ public class CodanProblemMarker implements ICodanProblemMarker {
}
return args;
}
/**
* Return problemId from marker
*
* @param marker
* @return codan problemId
*/
public static String getProblemId(IMarker marker) {
try {
return (String) marker.getAttribute(IMarker.PROBLEM);
} catch (CoreException e) {
return null;
}
}
/**
* @param marker
* @return problem message
*/
public static String getMessage(IMarker marker) {
try {
return (String) marker.getAttribute(IMarker.MESSAGE);
} catch (CoreException e) {
return null;
}
}
}