improved php parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPSyntaxPreferencePage.java
1 /**********************************************************************
2 Copyright (c) 2000, 2002 IBM Corp. 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     IBM Corporation - Initial implementation
10     Klaus Hartlage - www.eclipseproject.de
11 **********************************************************************/
12 package net.sourceforge.phpeclipse;
13
14 import org.eclipse.jface.preference.BooleanFieldEditor;
15 import org.eclipse.jface.preference.ColorFieldEditor;
16 import org.eclipse.jface.preference.DirectoryFieldEditor;
17 import org.eclipse.jface.preference.FieldEditorPreferencePage;
18 import org.eclipse.jface.preference.IPreferenceStore;
19 import org.eclipse.jface.preference.StringFieldEditor;
20 import org.eclipse.ui.IWorkbench;
21 import org.eclipse.ui.IWorkbenchPreferencePage;
22
23 /**
24  * 
25  * @author khartlage
26  */
27 public class PHPSyntaxPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceConstants {
28
29   public PHPSyntaxPreferencePage() {
30     super(FieldEditorPreferencePage.GRID);
31     //Initialize the preference store we wish to use
32     setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore());
33   }
34
35   protected void createFieldEditors() {
36     final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
37
38     ColorFieldEditor multilineComment =
39       new ColorFieldEditor(PHP_MULTILINE_COMMENT, "Multi-line comment:", this.getFieldEditorParent());
40     this.addField(multilineComment);
41     ColorFieldEditor singlelineComment =
42       new ColorFieldEditor(PHP_SINGLELINE_COMMENT, "Single-line comment:", this.getFieldEditorParent());
43     this.addField(singlelineComment);
44     ColorFieldEditor keyWords = new ColorFieldEditor(PHP_KEYWORD, "Keywords:", this.getFieldEditorParent());
45     this.addField(keyWords);
46     ColorFieldEditor variables = new ColorFieldEditor(PHP_VARIABLE, "Variables:", this.getFieldEditorParent());
47     this.addField(variables);
48     ColorFieldEditor types = new ColorFieldEditor(PHP_FUNCTIONNAME, "Types:", this.getFieldEditorParent());
49     this.addField(types);
50     ColorFieldEditor strings = new ColorFieldEditor(PHP_STRING, "Strings:", this.getFieldEditorParent());
51     this.addField(strings);
52     ColorFieldEditor others = new ColorFieldEditor(PHP_DEFAULT, "Others:", this.getFieldEditorParent());
53     this.addField(others);
54   }
55
56   /**
57    * @see IWorkbenchPreferencePage#init
58    */
59   public void init(IWorkbench workbench) {
60   }
61
62 }