mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 23:45:23 +02:00
convinience methods to manipulate marker attributes
This commit is contained in:
parent
ec4b080977
commit
a4a8abe72d
1 changed files with 26 additions and 0 deletions
|
@ -176,4 +176,30 @@ public class CodanProblemMarker implements ICodanProblemMarker {
|
||||||
}
|
}
|
||||||
return args;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue