*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse.xml.ui / src / net / sourceforge / phpeclipse / xml / ui / internal / text / SingleTokenScanner.java
1 /*
2  * Copyright (c) 2002-2004 Widespace, OU and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  *     Igor Malinin - initial contribution
10  *
11  * $Id: SingleTokenScanner.java,v 1.1 2004-09-02 18:28:03 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.xml.ui.internal.text;
15
16 import java.util.Map;
17
18 import org.eclipse.jface.text.rules.RuleBasedScanner;
19 import org.eclipse.jface.text.rules.Token;
20
21 /**
22  * @author Igor Malinin
23  */
24 public class SingleTokenScanner extends RuleBasedScanner {
25
26         /**
27          * Creates a single token scanner.
28          */
29         public SingleTokenScanner(Map tokens, String property) {
30                 setDefaultReturnToken((Token) tokens.get(property));
31         }
32 }