use of org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker in project webtools.sourceediting by eclipse.
the class DocumentFactoryForJSP method addNestablePrefix.
private void addNestablePrefix(JSPSourceParser parser, String tagName) {
TagMarker bm = new TagMarker(tagName);
parser.addNestablePrefix(bm);
}
use of org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker in project webtools.sourceediting by eclipse.
the class JSPDocumentLoader method addNestablePrefix.
protected void addNestablePrefix(JSPSourceParser parser, String tagName) {
TagMarker bm = new TagMarker(tagName);
parser.addNestablePrefix(bm);
}
use of org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker 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;
}
use of org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker in project webtools.sourceediting by eclipse.
the class StructuredTextPartitionerForJSP method isAction.
/**
* @param sdRegion
* @param offset
* @return
*/
private boolean isAction(IStructuredDocumentRegion sdRegion, int offset) {
if (!sdRegion.getType().equals(DOMRegionContext.XML_TAG_NAME))
return false;
/*
* shouldn't get a tag name region type unless a tag name region
* exists at [1]
*/
ITextRegion tagNameRegion = sdRegion.getRegions().get(1);
String tagName = sdRegion.getText(tagNameRegion);
RegionParser parser = fStructuredDocument.getParser();
if (parser instanceof JSPSourceParser) {
if (tagName.equals(fLastCheckedPrefix))
return true;
List fCustomActionPrefixes = ((JSPSourceParser) parser).getNestablePrefixes();
for (int i = 0; i < fCustomActionPrefixes.size(); i++) if (tagName.startsWith(((TagMarker) fCustomActionPrefixes.get(i)).getTagName())) {
fLastCheckedPrefix = ((TagMarker) fCustomActionPrefixes.get(i)).getTagName();
return true;
}
}
return false;
}
Aggregations