use of org.eclipse.wst.sse.core.internal.ltk.parser.JSPCapableParser in project webtools.sourceediting by eclipse.
the class TLDCMDocumentManager method handlePreludes.
void handlePreludes() {
IStructuredDocumentRegion anchor = new ZeroStructuredDocumentRegion(null, -1);
fProcessIncludes = false;
IPath currentPath = getCurrentParserPath();
if (currentPath != null) {
PropertyGroup[] propertyGroups = DeploymentDescriptorPropertyCache.getInstance().getPropertyGroups(currentPath);
for (int k = 0; k < propertyGroups.length; k++) {
IPath[] preludes = propertyGroups[k].getIncludePrelude();
for (int i = 0; i < preludes.length; i++) {
if (!getIncludes().contains(preludes[i]) && !preludes[i].equals(currentPath)) {
getIncludes().push(preludes[i]);
if (getParser() != null) {
IncludeHelper includeHelper = new IncludeHelper(anchor, getParser());
includeHelper.parse(preludes[i]);
List references = includeHelper.taglibReferences;
fTLDCMReferencesMap.put(preludes[i], references);
if (getParser() instanceof JSPCapableParser) {
for (int j = 0; j < references.size(); j++) {
TLDCMDocumentReference reference = (TLDCMDocumentReference) references.get(j);
// $NON-NLS-1$
((JSPCapableParser) getParser()).addNestablePrefix(new TagMarker(reference.prefix + ":"));
}
}
} else
// $NON-NLS-1$ //$NON-NLS-2$
Logger.log(Logger.WARNING, "Warning: parser text was requested by " + getClass().getName() + " but none was available; taglib support disabled");
getIncludes().pop();
}
}
}
}
fProcessIncludes = true;
}
Aggregations