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.StringFieldEditor;
8 import org.eclipse.swt.widgets.Composite;
9 import org.eclipse.ui.IWorkbench;
10 import org.eclipse.ui.IWorkbenchPreferencePage;
13 * This page will be added to the project's property page dialog when the
14 * "Properties..." popup menu item is selected
16 public class PHPMiscProjectPreferences extends FieldEditorOverlayPage
18 IWorkbenchPreferencePage,
19 IMiscProjectPreferences {
21 public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences";
22 public PHPMiscProjectPreferences() {
28 * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
30 protected String getPageId() {
34 protected void createFieldEditors() {
35 Composite composite = getFieldEditorParent();
37 addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF,
38 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.localhost"),
40 addField(new StringFieldEditor(IPreferenceConstants.PHP_DOCUMENTROOT_PREF,
41 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"),
43 addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
44 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
46 //if (!isPropertyPage)) {
51 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
53 protected IPreferenceStore doGetPreferenceStore() {
54 return WebUI.getDefault().getPreferenceStore();
57 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
59 public void init(IWorkbench workbench) {
60 setDescription("Default entries for misc project settings.");