1 package net.sourceforge.phpeclipse.preferences;
2 import net.sourceforge.phpeclipse.IPreferenceConstants;
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
5 import org.eclipse.jface.preference.IPreferenceStore;
6 import org.eclipse.jface.preference.StringFieldEditor;
7 import org.eclipse.swt.widgets.Composite;
8 import org.eclipse.ui.IWorkbench;
9 import org.eclipse.ui.IWorkbenchPreferencePage;
11 import net.sourceforge.phpeclipse.overlaypages.FieldEditorOverlayPage;
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_DOCUMENTROOT_PREF,
42 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"),
44 addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
45 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
47 //if (!isPropertyPage)) {
52 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
54 protected IPreferenceStore doGetPreferenceStore() {
55 return PHPeclipsePlugin.getDefault().getPreferenceStore();
58 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
60 public void init(IWorkbench workbench) {
61 setDescription("Default entries for misc project settings.");