if(tokenMarker == null) return; Segment line = new Segment(); try { Element map = getDefaultRootElement(); int lines = map.getElementCount(); for(int i = 0; i < lines; i++) { Element lineElement = map.getElement(i); int start = lineElement.getStartOffset(); getText(start,lineElement.getEndOffset() - start,line); tokenMarker.markTokens(line,i); } } catch(BadLocationException bl) { bl.printStackTrace(); }
tokenizeLines();
	public void setTokenMarker(TokenMarker tokenMarker)	{		this.tokenMarker = tokenMarker;		if(tokenMarker == null)			return;		Segment line = new Segment();		try		{			Element map = getDefaultRootElement();			int lines = map.getElementCount();			for(int i = 0; i < lines; i++)			{				Element lineElement = map.getElement(i);				int start = lineElement.getStartOffset();				getText(start,lineElement.getEndOffset()					- start,line);				tokenMarker.markTokens(line,i);			}		}		catch(BadLocationException bl)		{			bl.printStackTrace();		}	}