public boolean isCommentOrWhitespace(int startPos, int endPos) throws BadLocationException { CommentOrWhitespaceTP tp = new CommentOrWhitespaceTP(getCommentTokens()); tokenizeText(tp, startPos, endPos, true); return !tp.nonEmpty; }
private int findDeclarationPositionImpl(String varName, int startPos, int endPos) { DeclarationTokenProcessor dtp = createDeclarationTokenProcessor(varName, startPos, endPos); if (dtp != null) { try { tokenizeText(dtp, startPos, endPos, true); return dtp.getDeclarationPosition(); } catch (BadLocationException e) { // will default to -1 } } return -1; }
public boolean isCommentOrWhitespace(int startPos, int endPos) throws BadLocationException { CommentOrWhitespaceTP tp= new CommentOrWhitespaceTP(getCommentTokens()); tokenizeText(tp, startPos, endPos, true); return !tp.nonEmpty; }
private int findDeclarationPositionImpl(String varName, int startPos, int endPos) { DeclarationTokenProcessor dtp = createDeclarationTokenProcessor(varName, startPos, endPos); if (dtp != null) { try { tokenizeText(dtp, startPos, endPos, true); return dtp.getDeclarationPosition(); } catch (BadLocationException e) { // will default to -1 } } return -1; }
protected Map buildLocalVariableMap(int offset) { int methodStartPos = getMethodStartPosition(offset); if (methodStartPos >= 0 && methodStartPos < offset) { VariableMapTokenProcessor vmtp = createVariableMapTokenProcessor(methodStartPos, offset); try { tokenizeText(vmtp, methodStartPos, offset, true); return vmtp.getVariableMap(); } catch (BadLocationException e) { // will default null } } return null; }
protected Map buildLocalVariableMap(int offset) { int methodStartPos = getMethodStartPosition(offset); if (methodStartPos >= 0 && methodStartPos < offset) { VariableMapTokenProcessor vmtp = createVariableMapTokenProcessor(methodStartPos, offset); try { tokenizeText(vmtp, methodStartPos, offset, true); return vmtp.getVariableMap(); } catch (BadLocationException e) { // will default null } } return null; }
/** Gets the token-id of the token at the given position. * @param offset position at which the token should be returned * @return token-id of the token at the requested position. If there's no more * tokens in the text, the <tt>Syntax.INVALID</tt> is returned. */ public TokenID getTokenID(int offset) throws BadLocationException { FirstTokenTP fttp = new FirstTokenTP(); tokenizeText(fttp, offset, getDocument().getLength(), true); return fttp.getTokenID(); }
/** * Gets the token-id of the token at the given position. * * @param offset * position at which the token should be returned * @return token-id of the token at the requested position. If there's no * more tokens in the text, the <tt>Syntax.INVALID</tt> is * returned. */ public TokenID getTokenID(int offset) throws BadLocationException { FirstTokenTP fttp = new FirstTokenTP(); tokenizeText(fttp, offset, getDocument().getLength(), true); return fttp.getTokenID(); }
targetOffset = itemStartPos; tokenizeText(this, startPos, itemStartPos, false); previousChunkLast = lastItem;
protected Map buildGlobalVariableMap(int offset) { int docLen = getDocument().getLength(); VariableMapTokenProcessor vmtp = createVariableMapTokenProcessor(0, docLen); if (vmtp != null) { try { tokenizeText(vmtp, 0, docLen, true); return vmtp.getVariableMap(); } catch (BadLocationException e) { // will default null } } return null; }
protected Map buildGlobalVariableMap(int offset) { int docLen = getDocument().getLength(); VariableMapTokenProcessor vmtp = createVariableMapTokenProcessor(0, docLen); if (vmtp != null) { try { tokenizeText(vmtp, 0, docLen, true); return vmtp.getVariableMap(); } catch (BadLocationException e) { // will default null } } return null; }
targetOffset = itemStartPos; tokenizeText(this, startPos, itemStartPos, false); previousChunkLast = lastItem;
targetOffset = endPos; tokenizeText(this, itemEndPos, endPos, false); nextChunkHead = firstItem;
targetOffset = endPos; tokenizeText(this, itemEndPos, endPos, false); nextChunkHead = firstItem;
TokenItemTP tp = new TokenItemTP(); tp.targetOffset = endOffset; tokenizeText(tp, startOffset, endOffset, false); chain = tp.getTokenChain();
TokenItemTP tp = new TokenItemTP(); tp.targetOffset = endOffset; tokenizeText(tp, startOffset, endOffset, false); chain = tp.getTokenChain();