/** * Highlights all instances of tokens identical to <code>t</code> in the * specified document. * * @param doc The document. * @param t The document whose relevant occurrences should be marked. * @param h The highlighter to add the highlights to. * @param p The painter for the highlights. */ public static final void markOccurrencesOfToken(RSyntaxDocument doc, Token t, RSyntaxTextAreaHighlighter h, SmartHighlightPainter p) { char[] lexeme = t.getLexeme().toCharArray(); int type = t.getType(); int lineCount = doc.getDefaultRootElement().getElementCount(); for (int i=0; i<lineCount; i++) { Token temp = doc.getTokenListForLine(i); while (temp!=null && temp.isPaintable()) { if (temp.is(type, lexeme)) { try { int end = temp.getEndOffset(); h.addMarkedOccurrenceHighlight(temp.getOffset(),end,p); } catch (BadLocationException ble) { ble.printStackTrace(); // Never happens } } temp = temp.getNextToken(); } } }
tagName = stack.pop(); if (t.getEndOffset()>=dot) { return tagName;
int mlcEnd = t.getEndOffset() - 1; if (currentFold==null) { currentFold = new Fold(FoldType.COMMENT, textArea, mlcStart);
if (t.getEndOffset()==dot || t.containsPosition(dot)) {
int phpEnd = t.getEndOffset() - 1; currentFold.setEndOffset(phpEnd); Fold parentFold = currentFold.getParent(); int mlcEnd = t.getEndOffset() - 1; currentFold.setEndOffset(mlcEnd); Fold parentFold = currentFold.getParent(); int mlcEnd = t.getEndOffset() - 1; currentFold.setEndOffset(mlcEnd); Fold parentFold = currentFold.getParent();
int mlcEnd = t.getEndOffset() - 1; if (currentFold==null) { currentFold = new Fold(FoldType.COMMENT, textArea, mlcStart);
token.getEndOffset()<=selEnd) { nextX = painter.paintSelected(token, g, nextX,y, host, this, clipStart, useSTC);
int mlcEnd = t.getEndOffset() - 1; if (currentFold==null) { currentFold = new Fold(FoldType.COMMENT, textArea, mlcStart);
while (token!=null && token.isPaintable() && token.getEndOffset()-1<p) {//<=p) { boolean paintBG = host.getPaintTokenBackgrounds(line, y); x = painter.paint(token, g, x,y, host, this, 0, paintBG);
while (token!=null && token.isPaintable() && token.getEndOffset()-1<p) {//<=p) { token.getEndOffset()<=selEnd) { x = painter.paintSelected(token, g, x,y, host, this,useSTC); token.getEndOffset()<=selEnd) { x = painter.paintSelected(token, g, x,y, host, this,useSTC);
/** * Highlights all instances of tokens identical to <code>t</code> in the * specified document. * * @param doc The document. * @param t The document whose relevant occurrences should be marked. * @param h The highlighter to add the highlights to. * @param p The painter for the highlights. */ public static final void markOccurrencesOfToken(RSyntaxDocument doc, Token t, RSyntaxTextAreaHighlighter h, SmartHighlightPainter p) { char[] lexeme = t.getLexeme().toCharArray(); int type = t.getType(); int lineCount = doc.getDefaultRootElement().getElementCount(); for (int i=0; i<lineCount; i++) { Token temp = doc.getTokenListForLine(i); while (temp!=null && temp.isPaintable()) { if (temp.is(type, lexeme)) { try { int end = temp.getEndOffset(); h.addMarkedOccurrenceHighlight(temp.getOffset(),end,p); } catch (BadLocationException ble) { ble.printStackTrace(); // Never happens } } temp = temp.getNextToken(); } } }
tagName = stack.pop(); if (t.getEndOffset()>=dot) { return tagName;
int mlcEnd = t.getEndOffset() - 1; if (currentFold==null) { currentFold = new Fold(FoldType.COMMENT, textArea, mlcStart);
toMark = t; if (t.getEndOffset()==dot || t.containsPosition(dot)) { break;
int phpEnd = t.getEndOffset() - 1; currentFold.setEndOffset(phpEnd); Fold parentFold = currentFold.getParent(); int mlcEnd = t.getEndOffset() - 1; currentFold.setEndOffset(mlcEnd); Fold parentFold = currentFold.getParent(); int mlcEnd = t.getEndOffset() - 1; currentFold.setEndOffset(mlcEnd); Fold parentFold = currentFold.getParent();
if (t.getEndOffset()==dot || t.containsPosition(dot)) {
int mlcEnd = t.getEndOffset() - 1; if (currentFold==null) { currentFold = new Fold(FoldType.COMMENT, textArea, mlcStart);
token.getEndOffset()<=selEnd) { nextX = painter.paintSelected(token, g, nextX,y, host, this, clipStart, useSTC);
while (token!=null && token.isPaintable() && token.getEndOffset()-1<p) {//<=p) { boolean paintBG = host.getPaintTokenBackgrounds(line, y); x = painter.paint(token, g, x,y, host, this, 0, paintBG);
while (token!=null && token.isPaintable() && token.getEndOffset()-1<p) {//<=p) { token.getEndOffset()<=selEnd) { x = painter.paintSelected(token, g, x,y, host, this,useSTC); token.getEndOffset()<=selEnd) { x = painter.paintSelected(token, g, x,y, host, this,useSTC);