Added first PHP parser version (doesn't work correct actually)
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPEclipsePreferencePage.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.DirectoryFieldEditor;
16 import org.eclipse.jface.preference.FieldEditorPreferencePage;
17 import org.eclipse.jface.preference.IPreferenceStore;
18 import org.eclipse.jface.preference.StringFieldEditor;
19 import org.eclipse.ui.IWorkbench;
20 import org.eclipse.ui.IWorkbenchPreferencePage;
21
22 /**
23  * 
24  * @author khartlage
25  */
26 public class PHPEclipsePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
27
28         public PHPEclipsePreferencePage() {
29                 super(FieldEditorPreferencePage.GRID);
30                 //Initialize the preference store we wish to use
31                 setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore());
32         }
33
34         protected void createFieldEditors() {
35                 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
36
37                 StringFieldEditor localhost = new StringFieldEditor(PHPeclipsePlugin.LOCALHOST_PREF, "&Localhost:", 60, getFieldEditorParent());
38
39                 DirectoryFieldEditor documentRoot =
40                         new DirectoryFieldEditor(PHPeclipsePlugin.DOCUMENTROOT_PREF, "&DocumentRoot:", getFieldEditorParent());
41
42                 BooleanFieldEditor useExternalBrowser =
43                         new BooleanFieldEditor(PHPeclipsePlugin.USE_EXTERNAL_BROWSER_PREF, "&Use External Browser", getFieldEditorParent());
44
45                 StringFieldEditor externalBrowser =
46                         new StringFieldEditor(PHPeclipsePlugin.EXTERNAL_BROWSER_PREF, "&External Browser command:", 60, getFieldEditorParent());
47
48                 StringFieldEditor startMySQL =
49                         new StringFieldEditor(PHPeclipsePlugin.MYSQL_PREF, "&MySQL command:", 60, getFieldEditorParent());
50
51
52                 StringFieldEditor startApache =
53                         new StringFieldEditor(PHPeclipsePlugin.APACHE_START_PREF, "Start &Apache command:", 60, getFieldEditorParent());
54
55
56                 StringFieldEditor stopApache = 
57                         new StringFieldEditor(PHPeclipsePlugin.APACHE_STOP_PREF, "&Stop Apache command:", 60, getFieldEditorParent());
58
59     
60                 StringFieldEditor restartApache =
61                         new StringFieldEditor(PHPeclipsePlugin.APACHE_RESTART_PREF, "&Restart Apache command:", 60, getFieldEditorParent());
62
63     
64                 addField(localhost);
65                 addField(documentRoot);
66                 addField(useExternalBrowser);
67                 addField(externalBrowser);
68                 addField(startMySQL);
69                 addField(startApache);
70
71                 addField(stopApache);
72                 addField(restartApache);
73         }
74
75         /**
76          * @see IWorkbenchPreferencePage#init
77          */
78         public void init(IWorkbench workbench) {
79         }
80
81 }