Search in sources :

Example 16 with BlockMarker

use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.

the class XMLLineTokenizer 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;
}
Also used : Iterator(java.util.Iterator) BlockMarker(org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker)

Example 17 with BlockMarker

use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.

the class XMLTokenizer 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;
}
Also used : Iterator(java.util.Iterator) BlockMarker(org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker)

Example 18 with BlockMarker

use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.

the class HTMLModelLoader method addHTMLishTag.

/**
 * Convenience method to add tag names using BlockMarker object
 */
protected void addHTMLishTag(XMLSourceParser parser, String tagname) {
    BlockMarker bm = new BlockMarker(tagname, null, DOMRegionContext.BLOCK_TEXT, false);
    parser.addBlockMarker(bm);
}
Also used : BlockMarker(org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker)

Example 19 with BlockMarker

use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.

the class ScanningTests method newXMLParser.

public static RegionParser newXMLParser() {
    XMLSourceParser parser = new XMLSourceParser();
    parser.addBlockMarker(new BlockMarker("Script", DOMRegionContext.BLOCK_TEXT, false));
    parser.addBlockMarker(new BlockMarker("stylE", DOMRegionContext.BLOCK_TEXT, false));
    return parser;
}
Also used : BlockMarker(org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker) XMLSourceParser(org.eclipse.wst.xml.core.internal.parser.XMLSourceParser)

Example 20 with BlockMarker

use of org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker in project webtools.sourceediting by eclipse.

the class JSPTranslator method decodeScriptBlock.

void decodeScriptBlock(String blockText, int startOfBlock) {
    XMLJSPRegionHelper helper = new XMLJSPRegionHelper(this, false);
    // $NON-NLS-1$
    helper.addBlockMarker(new BlockMarker("jsp:scriptlet", null, DOMJSPRegionContexts.JSP_CONTENT, false));
    // $NON-NLS-1$
    helper.addBlockMarker(new BlockMarker("jsp:expression", null, DOMJSPRegionContexts.JSP_CONTENT, false));
    // $NON-NLS-1$
    helper.addBlockMarker(new BlockMarker("jsp:declaration", null, DOMJSPRegionContexts.JSP_CONTENT, false));
    // $NON-NLS-1$
    helper.addBlockMarker(new BlockMarker("jsp:directive.include", null, DOMJSPRegionContexts.JSP_CONTENT, false));
    // $NON-NLS-1$
    helper.addBlockMarker(new BlockMarker("jsp:directive.taglib", null, DOMJSPRegionContexts.JSP_CONTENT, false));
    helper.reset(blockText, startOfBlock);
    // force parse
    helper.forceParse();
}
Also used : BlockMarker(org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker)

Aggregations

BlockMarker (org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker)22 Iterator (java.util.Iterator)8 XMLSourceParser (org.eclipse.wst.xml.core.internal.parser.XMLSourceParser)4 BlockTagParser (org.eclipse.wst.sse.core.internal.ltk.parser.BlockTagParser)2 RegionParser (org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser)2 CMNode (org.eclipse.wst.xml.core.internal.contentmodel.CMNode)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 BadLocationException (org.eclipse.jface.text.BadLocationException)1 IDocumentExtension3 (org.eclipse.jface.text.IDocumentExtension3)1 TLDElementDeclaration (org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration)1 ModelHandlerForJSP (org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP)1 JSPSourceParser (org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser)1 StructuredDocumentRegionHandler (org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandler)1 StructuredDocumentRegionHandlerExtension (org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandlerExtension)1 StructuredDocumentRegionParser (org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionParser)1 StructuredDocumentRegionParserExtension (org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionParserExtension)1 IEncodedDocument (org.eclipse.wst.sse.core.internal.provisional.document.IEncodedDocument)1 IStructuredDocument (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)1 IStructuredDocumentRegion (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion)1