/** Get the blocks consisting of comments in a specified document area. * @param doc document to work with * @param startPos starting position of the searched document area * @param endPos ending position of the searched document area */ public int[] getCommentBlocks(int startPos, int endPos) throws BadLocationException { return getTokenBlocks(startPos, endPos, getCommentTokens()); }
/** * Get the blocks consisting of comments in a specified document area. * * @param doc * document to work with * @param startPos * starting position of the searched document area * @param endPos * ending position of the searched document area */ public int[] getCommentBlocks(int startPos, int endPos) throws BadLocationException { return getTokenBlocks(startPos, endPos, getCommentTokens()); }
public boolean isCommentOrWhitespace(int startPos, int endPos) throws BadLocationException { CommentOrWhitespaceTP tp = new CommentOrWhitespaceTP(getCommentTokens()); tokenizeText(tp, startPos, endPos, true); return !tp.nonEmpty; }
public boolean isCommentOrWhitespace(int startPos, int endPos) throws BadLocationException { CommentOrWhitespaceTP tp= new CommentOrWhitespaceTP(getCommentTokens()); tokenizeText(tp, startPos, endPos, true); return !tp.nonEmpty; }