deleted old partition test; no longer suitable
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / preferences / PHPMiscProjectPreferences.java
1 package net.sourceforge.phpeclipse.preferences;
2 import net.sourceforge.phpeclipse.IPreferenceConstants;
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
4
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;
10
11 import net.sourceforge.phpeclipse.overlaypages.FieldEditorOverlayPage;
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_DOCUMENTROOT_PREF,
42         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"),
43         composite)); 
44     addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
45         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
46         composite));
47     //if (!isPropertyPage)) {
48     //  
49     //}
50   }
51   /* (non-Javadoc)
52    * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
53    */
54   protected IPreferenceStore doGetPreferenceStore() {
55     return PHPeclipsePlugin.getDefault().getPreferenceStore();
56   }
57   /* (non-Javadoc)
58    * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
59    */
60   public void init(IWorkbench workbench) {
61     setDescription("Default entries for misc project settings.");
62   }
63 }