use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project liferay-ide by liferay.
the class AlloyJSPDocumentLoader method newEncodedDocument.
@Override
protected IEncodedDocument newEncodedDocument() {
IEncodedDocument retval = super.newEncodedDocument();
if (retval instanceof IStructuredDocument) {
IStructuredDocument doc = (IStructuredDocument) retval;
RegionParser parser = doc.getParser();
if (parser instanceof BlockTagParser) {
BlockTagParser blockParser = (BlockTagParser) parser;
BlockMarker bm = new BlockMarker("aui:script", null, DOMRegionContext.BLOCK_TEXT, false);
blockParser.addBlockMarker(bm);
}
}
return retval;
}
use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.
the class HTMLTokenizer method getBlockMarkerCaseSensitivity.
/* user method */
public boolean getBlockMarkerCaseSensitivity(String name) {
Iterator iterator = fBlockMarkers.iterator();
while (iterator.hasNext()) {
BlockMarker marker = (BlockMarker) iterator.next();
boolean casesensitive = marker.isCaseSensitive();
if (casesensitive && marker.getTagName().equals(name))
return casesensitive;
else if (!casesensitive && marker.getTagName().equalsIgnoreCase(name))
return casesensitive;
}
return true;
}
use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.
the class JSPTranslator method addBlockMarkers.
/*
* adds block markers to JSPTranslator's block marker list for all
* elements in doc @param doc
*/
protected void addBlockMarkers(CMDocument doc) {
if (doc.getElements().getLength() > 0) {
Iterator elements = doc.getElements().iterator();
CMNode node = null;
while (elements.hasNext()) {
node = (CMNode) elements.next();
getBlockMarkers().add(new BlockMarker(node.getNodeName(), null, DOMJSPRegionContexts.JSP_CONTENT, true));
}
}
}
use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.
the class ScannerUnitTests method setUpJSP.
protected IStructuredDocumentRegionList setUpJSP(String text) {
setupModel(new ModelHandlerForJSP());
parser.addBlockMarker(new BlockMarker("script", null, DOMRegionContext.BLOCK_TEXT, false));
parser.addBlockMarker(new BlockMarker("style", null, DOMRegionContext.BLOCK_TEXT, false));
parser.addBlockMarker(new BlockMarker("disallowJSP", null, DOMRegionContext.BLOCK_TEXT, true, false));
/*
* IStructuredDocumentRegionList nodes = setUpJSP("content <script>
* <%= expression %> </script> <a> </a> <foo:disallowJSP> <%= %>
* </foo:disallowJSP> >"); parser.addBlockMarker(new
* BlockMarker("jsp:declaration", null,
* XMLJSPRegionContexts.JSP_CONTENT, true)); parser.addBlockMarker(new
* BlockMarker("jsp:expression", null,
* XMLJSPRegionContexts.JSP_CONTENT, true)); parser.addBlockMarker(new
* BlockMarker("jsp:scriptlet", null,
* XMLJSPRegionContexts.JSP_CONTENT, true));
*/
input = text;
fModel.set(input);
return fModel.getRegionList();
}
use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.
the class ScannerUnitTests method setUpXML.
protected IStructuredDocumentRegionList setUpXML(String text) {
setupModel(new ModelHandlerForXML());
parser.addBlockMarker(new BlockMarker("script", null, DOMRegionContext.BLOCK_TEXT, false));
parser.addBlockMarker(new BlockMarker("style", null, DOMRegionContext.BLOCK_TEXT, false));
parser.addBlockMarker(new BlockMarker("disallowJSP", null, DOMRegionContext.BLOCK_TEXT, true, false));
input = text;
fModel.set(input);
return fModel.getRegionList();
}
Aggregations