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
9 IBM Corporation - Initial implementation
10 Klaus Hartlage - www.eclipseproject.de
11 **********************************************************************/
12 package net.sourceforge.phpeclipse;
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;
26 public class PHPEclipsePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
28 public PHPEclipsePreferencePage() {
29 super(FieldEditorPreferencePage.GRID);
30 //Initialize the preference store we wish to use
31 setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore());
34 protected void createFieldEditors() {
35 final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
37 StringFieldEditor localhost = new StringFieldEditor(PHPeclipsePlugin.LOCALHOST_PREF, "&Localhost:", 60, getFieldEditorParent());
39 DirectoryFieldEditor documentRoot =
40 new DirectoryFieldEditor(PHPeclipsePlugin.DOCUMENTROOT_PREF, "&DocumentRoot:", getFieldEditorParent());
42 BooleanFieldEditor useExternalBrowser =
43 new BooleanFieldEditor(PHPeclipsePlugin.USE_EXTERNAL_BROWSER_PREF, "&Use External Browser", getFieldEditorParent());
45 StringFieldEditor externalBrowser =
46 new StringFieldEditor(PHPeclipsePlugin.EXTERNAL_BROWSER_PREF, "&External Browser command:", 60, getFieldEditorParent());
48 StringFieldEditor startMySQL =
49 new StringFieldEditor(PHPeclipsePlugin.MYSQL_PREF, "&MySQL command:", 60, getFieldEditorParent());
52 StringFieldEditor startApache =
53 new StringFieldEditor(PHPeclipsePlugin.APACHE_START_PREF, "Start &Apache command:", 60, getFieldEditorParent());
56 StringFieldEditor stopApache =
57 new StringFieldEditor(PHPeclipsePlugin.APACHE_STOP_PREF, "&Stop Apache command:", 60, getFieldEditorParent());
60 StringFieldEditor restartApache =
61 new StringFieldEditor(PHPeclipsePlugin.APACHE_RESTART_PREF, "&Restart Apache command:", 60, getFieldEditorParent());
65 addField(documentRoot);
66 addField(useExternalBrowser);
67 addField(externalBrowser);
69 addField(startApache);
72 addField(restartApache);
76 * @see IWorkbenchPreferencePage#init
78 public void init(IWorkbench workbench) {