replaced a lot of deprecated code; if someone runs into a commit conflict afterwards...
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / preferences / PHPMiscProjectPreferences.java
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;
5
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;
12 /**
13  *
14  * This page will be added to the project's property page dialog when the
15  * "Properties..." popup menu item is selected
16  */
17 public class PHPMiscProjectPreferences extends FieldEditorOverlayPage
18     implements
19       IWorkbenchPreferencePage,
20       IMiscProjectPreferences {
21
22   public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences";
23   public PHPMiscProjectPreferences() {
24     super(GRID);
25   }
26   /*
27    * (non-Javadoc)
28    *
29    * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
30    */
31   protected String getPageId() {
32     return PREF_ID;
33   }
34
35   protected void createFieldEditors() {
36     Composite composite = getFieldEditorParent();
37
38     addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF,
39         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.localhost"),
40         composite));
41 //    addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
42 //        PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
43 //        composite));
44     addField(new StringFieldEditor(IPreferenceConstants.PHP_DOCUMENTROOT_PREF,
45         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"),
46         composite));
47
48     PathEditor pe = new PathEditor(IPreferenceConstants.PHP_INCLUDE_PATHS,
49         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.include_paths"),
50         "Choose Path...",
51         composite);
52     addField(pe);
53
54
55
56     //if (!isPropertyPage)) {
57     //
58     //}
59   }
60   /* (non-Javadoc)
61    * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
62    */
63   protected IPreferenceStore doGetPreferenceStore() {
64     return WebUI.getDefault().getPreferenceStore();
65   }
66   /* (non-Javadoc)
67    * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
68    */
69   public void init(IWorkbench workbench) {
70     setDescription("Default entries for PHP projects.");
71   }
72 }