/** * user method * does a lookahead for the current tag name */ private final String doBlockTagScan() throws IOException { fIsCaseSensitiveBlocking = getBlockMarkerCaseSensitivity(); return doScan("</" + fCurrentTagName, true, getBlockMarkerContext(fCurrentTagName), YYINITIAL, YYINITIAL); } /**
/** * user method * * A generic lookahead-like operation */ private final String doBlockScan(String target, String targetContext, int immediateFallbackState) throws IOException { return doScan(target, false, targetContext, immediateFallbackState, immediateFallbackState); } /**
private static int [] zzUnpackAction() { int [] result = new int[7]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
public int getEndOffset() { // our startOffset take into account our parent, and our start return getStartOffset() + getLength(); }
/** * Removes and returns the int at the top of the stack * * @return int at the top of this stack. * @exception EmptyStackException * when empty. */ public int pop() { int value = peek(); list[size - 1] = -1; size--; return value; }
/** * @return IStructuredDocumentRegion */ protected IStructuredDocumentRegion createStructuredDocumentRegion(String type) { IStructuredDocumentRegion newNode = null; if (type == DOMRegionContext.BLOCK_TEXT) newNode = XMLStructuredRegionFactory.createRegion(XMLStructuredRegionFactory.XML_BLOCK); else newNode = XMLStructuredRegionFactory.createRegion(XMLStructuredRegionFactory.XML); return newNode; }
@Override public IStructuredDocumentRegion getDocumentRegions() { return super.getDocumentRegions(); }
public RegionParser getParser() { return new XMLSourceParser(); }
public boolean containsOffset(int i) { return getStartOffset() <= i && i < getEndOffset(); }
/** * Resets the input. */ public void reset(java.io.Reader reader) { reset(reader, 0); }
public ITextRegion createToken(String context, int start, int textLength, int length) { return this.createToken(context, start, textLength, length, null, null); }
private static int [] zzUnpackAttribute() { int [] result = new int[7]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; }
private static int [] zzUnpackRowMap() { int [] result = new int[7]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; }
public StructuredDocumentEvent reparse() { final StructuredDocumentEvent event = super.reparse(); return event; } }
public IntStack(int maxdepth) { super(); list = new int[maxdepth]; initialize(); }
private final boolean isBlockMarker(String tagName) { if (!fIsBlockingEnabled) return false; return containsTagName(tagName); } /**
protected BlockTokenizer getTokenizer() { if (fTokenizer == null) { fTokenizer = new XMLTokenizer(); } return fTokenizer; }
/** * user method */ public final void beginBlockTagScan(String newTagName) { beginBlockMarkerScan(newTagName, BLOCK_TEXT); } /**
private final String scanXMLCommentText() throws IOException { // Scan for '-->' and return the text up to that point as // XML_COMMENT_TEXT unless the string occurs IMMEDIATELY, in which // case change to the ST_XML_COMMENT_END state and return the next // context as usual. return doScan("-->", false, XML_COMMENT_TEXT, ST_XML_COMMENT_END, ST_XML_COMMENT_END); }
public ITextRegion createToken(ITextRegionContainer parent, String context, int start, int textLength, int length, String lang, String surroundingTag) { ITextRegion newRegion = createToken(context, start, textLength, length); // DW, 4/16/2003 token regions no longer have parents //newRegion.setParent(parent); return newRegion; }