fixed "replace all" bug
[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.StringFieldEditor;
8 import org.eclipse.swt.widgets.Composite;
9 import org.eclipse.ui.IWorkbench;
10 import org.eclipse.ui.IWorkbenchPreferencePage;
11 /**
12  * 
13  * This page will be added to the project's property page dialog when the
14  * "Properties..." popup menu item is selected
15  */
16 public class PHPMiscProjectPreferences extends FieldEditorOverlayPage
17     implements
18       IWorkbenchPreferencePage,
19       IMiscProjectPreferences {
20
21   public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences";
22   public PHPMiscProjectPreferences() {
23     super(GRID);
24   }
25   /*
26    * (non-Javadoc)
27    * 
28    * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
29    */
30   protected String getPageId() {
31     return PREF_ID;
32   }
33   
34   protected void createFieldEditors() {
35     Composite composite = getFieldEditorParent();
36
37     addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF,
38         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.localhost"),
39         composite));
40     addField(new StringFieldEditor(IPreferenceConstants.PHP_DOCUMENTROOT_PREF,
41         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"),
42         composite)); 
43     addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
44         PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
45         composite));
46     //if (!isPropertyPage)) {
47     //  
48     //}
49   }
50   /* (non-Javadoc)
51    * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
52    */
53   protected IPreferenceStore doGetPreferenceStore() {
54     return WebUI.getDefault().getPreferenceStore();
55   }
56   /* (non-Javadoc)
57    * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
58    */
59   public void init(IWorkbench workbench) {
60     setDescription("Default entries for misc project settings.");
61   }
62 }