1 package net.sourceforge.phpeclipse.ui.preferences;
3 import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
4 import net.sourceforge.phpeclipse.ui.WebUI;
5 import net.sourceforge.phpeclipse.ui.overlaypages.FieldEditorOverlayPage;
7 import org.eclipse.jface.preference.IPreferenceStore;
8 import org.eclipse.jface.preference.PathEditor;
9 import org.eclipse.jface.preference.StringFieldEditor;
10 import org.eclipse.swt.widgets.Composite;
11 import org.eclipse.ui.IWorkbench;
12 import org.eclipse.ui.IWorkbenchPreferencePage;
16 * This page will be added to the project's property page dialog when the
17 * "Properties..." popup menu item is selected
19 public class PHPMiscProjectPreferences extends FieldEditorOverlayPage implements
20 IWorkbenchPreferencePage, IMiscProjectPreferences {
22 public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences";
24 public PHPMiscProjectPreferences() {
31 * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
33 protected String getPageId() {
37 protected void createFieldEditors() {
38 Composite composite = getFieldEditorParent();
40 addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF,
41 PHPPreferencesMessages
42 .getString("PHPMiscProjectPreferences.localhost"),
45 // StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
46 // PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
48 addField(new StringFieldEditor(
49 IPreferenceConstants.PHP_DOCUMENTROOT_PREF,
50 PHPPreferencesMessages
51 .getString("PHPMiscProjectPreferences.documentroot"),
54 PathEditor pe = new PathEditor(IPreferenceConstants.PHP_INCLUDE_PATHS,
55 PHPPreferencesMessages
56 .getString("PHPMiscProjectPreferences.include_paths"),
57 "Choose Path...", composite);
60 // if (!isPropertyPage)) {
68 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
70 protected IPreferenceStore doGetPreferenceStore() {
71 return WebUI.getDefault().getPreferenceStore();
77 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
79 public void init(IWorkbench workbench) {
80 setDescription("Default entries for PHP projects.");