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.SWT;
10 import org.eclipse.swt.layout.GridData;
11 import org.eclipse.swt.layout.RowLayout;
12 import org.eclipse.swt.widgets.Composite;
13 import org.eclipse.ui.IWorkbench;
14 import org.eclipse.ui.IWorkbenchPreferencePage;
17 * This page will be added to the project's property page dialog when the
18 * "Properties..." popup menu item is selected
20 public class PHPMiscProjectPreferences extends FieldEditorOverlayPage
22 IWorkbenchPreferencePage,
23 IMiscProjectPreferences {
25 public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences";
26 public PHPMiscProjectPreferences() {
32 * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
34 protected String getPageId() {
38 protected void createFieldEditors() {
39 Composite composite = getFieldEditorParent();
41 addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF,
42 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.localhost"),
44 addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
45 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
47 addField(new StringFieldEditor(IPreferenceConstants.PHP_DOCUMENTROOT_PREF,
48 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"),
51 PathEditor pe = new PathEditor(IPreferenceConstants.PHP_INCLUDE_PATHS,
52 PHPPreferencesMessages.getString("PHPMiscProjectPreferences.include_paths"),
59 //if (!isPropertyPage)) {
64 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
66 protected IPreferenceStore doGetPreferenceStore() {
67 return WebUI.getDefault().getPreferenceStore();
70 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
72 public void init(IWorkbench workbench) {
73 setDescription("Default entries for PHP projects.");