public void markTokens(int lineIndex,TokenHandler tokenHandler){
  Segment seg=new Segment();
  if (lineIndex < 0 || lineIndex >= lineMgr.getLineCount())   throw new ArrayIndexOutOfBoundsException("lineCount=" + lineMgr.getLineCount() + "; index="+ lineIndex);
  int firstInvalidLineContext=lineMgr.getFirstInvalidLineContext();
  int start;
  if (firstInvalidLineContext == -1) {
    start=lineIndex;
  }
 else {
    start=Math.min(firstInvalidLineContext,lineIndex);
  }
  TokenMarker.LineContext oldContext=null;
  TokenMarker.LineContext context=null;
  for (int i=start; i <= lineIndex; i++) {
    getLineText(i,seg);
    oldContext=lineMgr.getLineContext(i);
    TokenMarker.LineContext prevContext=((i == 0) ? null : lineMgr.getLineContext(i - 1));
    TokenHandler _tokenHandler=i == lineIndex ? tokenHandler : DummyTokenHandler.INSTANCE;
    context=markTokens(seg,prevContext,_tokenHandler);
    lineMgr.setLineContext(i,context);
  }
  int lineCount=lineMgr.getLineCount();
  if (lineCount - 1 == lineIndex)   lineMgr.setFirstInvalidLineContext(-1);
 else   if (oldContext != context)   lineMgr.setFirstInvalidLineContext(lineIndex + 1);
 else   if (firstInvalidLineContext == -1)   ;
 else {
    lineMgr.setFirstInvalidLineContext(Math.max(firstInvalidLineContext,lineIndex + 1));
  }
}

public void markTokens ( int lineIndex , TokenHandler tokenHandler ) { Segment seg = new Segment ( ) ; if ( lineIndex < 0 || lineIndex >= lineMgr . getLineCount ( ) ) throw new ArrayIndexOutOfBoundsException ( "lineCount=" + lineMgr . getLineCount ( ) + "; index=" + lineIndex ) ; int firstInvalidLineContext = lineMgr . getFirstInvalidLineContext ( ) ; int start ; if ( firstInvalidLineContext == - 1 ) { start = lineIndex ; } else { start = Math . min ( firstInvalidLineContext , lineIndex ) ; } TokenMarker . LineContext oldContext = null ; TokenMarker . LineContext context = null ; for ( int i = start ; i <= lineIndex ; i ++ ) { getLineText ( i , seg ) ; oldContext = lineMgr . getLineContext ( i ) ; TokenMarker . LineContext prevContext = ( ( i == 0 ) ? null : lineMgr . getLineContext ( i - 1 ) ) ; TokenHandler _tokenHandler = i == lineIndex ? tokenHandler : DummyTokenHandler . INSTANCE ; context = markTokens ( seg , prevContext , _tokenHandler ) ; lineMgr . setLineContext ( i , context ) ; } int lineCount = lineMgr . getLineCount ( ) ; if ( lineCount - 1 == lineIndex ) lineMgr . setFirstInvalidLineContext ( - 1 ) ; else if ( oldContext != context ) lineMgr . setFirstInvalidLineContext ( lineIndex + 1 ) ; else if ( firstInvalidLineContext == - 1 ) ; else { lineMgr . setFirstInvalidLineContext ( Math . max ( firstInvalidLineContext , lineIndex + 1 ) ) ; } }
returns the syntax tokens for the specified line .
