Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2009 itemis AG ( and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at /
 package org.eclipse.xtext.ui.editor.syntaxcoloring;
import  org.eclipse.jface.text.IDocument;
import  org.eclipse.jface.text.rules.IToken;
import  org.eclipse.jface.text.rules.Token;
import  org.eclipse.xtext.ide.editor.syntaxcoloring.HighlightingStyles;

Sebastian Zarnekow - Initial contribution and API
public class DefaultTokenScanner extends AbstractTokenScanner {
	private int length;
	private boolean tokenReturned;
	public int getTokenLength() {
		return ;
	public int getTokenOffset() {
		return 0;
	public IToken nextToken() {
		if (!) {
			 = true;
			return new Token(getAttribute(HighlightingStyles.DEFAULT_ID));
		return Token.EOF;
	public void setRange(IDocument documentint offsetint length) {
		this. = length;
		this. = false;
New to GrepCode? Check out our FAQ X