Added PHPUnitEditor and corresponding PHPPreferencePage
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ui / text / SingleTokenPHPScanner.java
1 /*
2  * (c) Copyright IBM Corp. 2000, 2001.
3  * All Rights Reserved.
4  */
5
6 package net.sourceforge.phpdt.ui.text;
7
8
9 import java.util.List;
10 import org.eclipse.jface.preference.IPreferenceStore;
11 import net.sourceforge.phpdt.ui.text.IColorManager;
12
13
14 /**
15  * 
16  */
17 public final class SingleTokenPHPScanner extends AbstractJavaScanner{
18         
19         
20         private String[] fProperty;
21         
22         public SingleTokenPHPScanner(IColorManager manager, IPreferenceStore store, String property) {
23                 super(manager, store);
24                 fProperty= new String[] { property };
25                 initialize();
26         }
27
28         /*
29          * @see AbstractJavaScanner#getTokenProperties()
30          */
31         protected String[] getTokenProperties() {
32                 return fProperty;
33         }
34
35         /*
36          * @see AbstractJavaScanner#createRules()
37          */
38         protected List createRules() {
39                 setDefaultReturnToken(getToken(fProperty[0]));
40                 return null;
41         }
42 }
43