public boolean isMarkerPresent(String makerType, int line, String text, String additionalAttribute, boolean setUsedFlag) {
boolean found = false;
List markers = getMarkersForLine(fResource, line);
for(int i = 0; i < markers.size(); i++) {
Marker marker = (Marker) markers.get(i);
String markerText = marker.getAttribute(IMarker.MESSAGE, (String) null);
try {
if(!marker.getType().equals(makerType)) {
continue;
}
if(additionalAttribute != null) {
// If additional attribute is not present check next marker
if(marker.getAttribute(additionalAttribute) == null) {
continue;
}
}
if(markerText != null && markerText.equals(text)) {
found = true;
if(setUsedFlag) {
try {
marker.setAttribute(EPIC_MARKER_USED_FLAG, true);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}