// get/create TLDCMDocument
TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(fStructuredDocument);
if (mgr != null) {
List trackers = mgr.getCMDocumentTrackers(getCurrentNode().getEnd());
Iterator it = trackers.iterator();
CMDocumentTracker tracker = null;
Iterator taglibRegions = null;
IStructuredDocumentRegion sdRegion = null;
ITextRegion r = null;
while (it.hasNext()) {
tracker = (CMDocumentTracker) it.next();
sdRegion = tracker.getStructuredDocumentRegion();
// since may be call from another thread (like a background
// job)
// this check is to be safer
if (sdRegion != null && !sdRegion.isDeleted()) {
taglibRegions = sdRegion.getRegions().iterator();
while (!sdRegion.isDeleted() && taglibRegions.hasNext()) {
r = (ITextRegion) taglibRegions.next();
if (r.getType().equals(DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)) {
String text = sdRegion.getText(r);
if (JSP12TLDNames.TAGLIB.equals(text) || JSP12Namespace.ElementName.DIRECTIVE_TAGLIB.equals(text)) {
addBlockMarkers(tracker.getDocument());
}
}
}
}
}