1 package net.sourceforge.phpeclipse.ui.preferences;
2 import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
3 import net.sourceforge.phpeclipse.ui.WebUI;
4 import net.sourceforge.phpeclipse.ui.overlaypages.FieldEditorOverlayPage;
6 import org.eclipse.jface.preference.IPreferenceStore;
7 import org.eclipse.jface.preference.PathEditor;
8 import org.eclipse.jface.preference.StringFieldEditor;
9 import org.eclipse.swt.widgets.Composite;
10 import org.eclipse.ui.IWorkbench;
11 import org.eclipse.ui.IWorkbenchPreferencePage;
14 * This page will be added to the project's property page dialog when the
15 * "Properties..." popup menu item is selected
17 public class PHPMiscProjectPreferences extends FieldEditorOverlayPage
19 IWorkbenchPreferencePage,
20 IMiscProjectPreferences {
22 public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences";
23 public PHPMiscProjectPreferences() {
29 * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
31 protected String getPageId() {
35 protected void createFieldEditors() {
36 Composite composite = getFieldEditorParent();
38 addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF,
39 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.localhost"),
41 addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
42 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
44 addField(new StringFieldEditor(IPreferenceConstants.PHP_DOCUMENTROOT_PREF,
45 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"),
48 PathEditor pe = new PathEditor(IPreferenceConstants.PHP_INCLUDE_PATHS,
49 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.include_paths"),
56 //if (!isPropertyPage)) {
61 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
63 protected IPreferenceStore doGetPreferenceStore() {
64 return WebUI.getDefault().getPreferenceStore();
67 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
69 public void init(IWorkbench workbench) {
70 setDescription("Default entries for PHP projects.");