TokenMarker tokenMarker = getTokenMarker(); Token tokens = tokenMarker.markTokens(buffer,line).firstToken;
Token tokens = buffer.markTokens(line).getFirstToken();
	public int xToOffset(int line, int x)	{		TokenMarker tokenMarker = getTokenMarker();		Token tokens = tokenMarker.markTokens(buffer,line).firstToken;		FontMetrics fm = painter.getFontMetrics();		getLineText(line,lineSegment);		char[] segmentArray = lineSegment.array;		int segmentOffset = lineSegment.offset;		int segmentCount = lineSegment.count;		int width = horizontalOffset;		int offset = 0;		Toolkit toolkit = painter.getToolkit();		Font defaultFont = painter.getFont();		SyntaxStyle[] styles = painter.getStyles();		for(;;)		{			byte id = tokens.id;			if(id == Token.END)				return offset;			if(id == Token.NULL)				fm = painter.getFontMetrics();			else				fm = styles[id].getFontMetrics(defaultFont);			int length = tokens.length;			for(int i = 0; i < length; i++)			{				char c = segmentArray[segmentOffset + offset + i];				int charWidth;				if(c == '\t')					charWidth = (int)painter.nextTabStop(width,offset + i)						- width;				else					charWidth = fm.charWidth(c);				if(painter.isBlockCaretEnabled())				{					if(x - charWidth <= width)						return offset + i;				}				else				{					if(x - charWidth / 2 <= width)						return offset + i;				}				width += charWidth;			}			offset += length;			tokens = tokens.next;		}	}