Committing more fixes for bug #1839622 RSE Path error. This will clean up php files...
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / preferences / PHPPreviewProjectPreferences.java
1 package net.sourceforge.phpeclipse.ui.preferences;
2
3 import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
4 import net.sourceforge.phpeclipse.ui.WebUI;
5 import net.sourceforge.phpeclipse.ui.overlaypages.FieldEditorOverlayPage;
6
7 import org.eclipse.jface.preference.BooleanFieldEditor;
8 import org.eclipse.jface.preference.IPreferenceStore;
9 import org.eclipse.swt.widgets.Composite;
10 import org.eclipse.ui.IWorkbench;
11 import org.eclipse.ui.IWorkbenchPreferencePage;
12
13 /**
14  * 
15  * This page will be added to the project's property page dialog when the
16  * "Properties..." popup menu item is selected
17  */
18 public class PHPPreviewProjectPreferences extends FieldEditorOverlayPage
19                 implements IWorkbenchPreferencePage {
20         public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences";
21
22         public PHPPreviewProjectPreferences() {
23                 super(GRID, true);
24         }
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         /*
36          * (non-Javadoc)
37          * 
38          * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
39          */
40         protected void createFieldEditors() {
41                 Composite composite = getFieldEditorParent();
42                 addField(new BooleanFieldEditor(
43                                 IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT,
44                                 PHPPreferencesMessages
45                                                 .getString("PHPPreviewProjectPreferences.auto_preview"),
46                                 composite));
47                 addField(new BooleanFieldEditor(
48                                 IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT,
49                                 PHPPreferencesMessages
50                                                 .getString("PHPPreviewProjectPreferences.bring_to_top_preview"),
51                                 composite));
52                 addField(new BooleanFieldEditor(
53                                 IPreferenceConstants.PHP_STICKY_BROWSER_URL_DEFAULT,
54                                 PHPPreferencesMessages
55                                                 .getString("PHPPreviewProjectPreferences.sticky_browser_url"),
56                                 composite));
57                 // addField(new BooleanFieldEditor(
58                 // IPreferenceConstants.PHP_SHOW_HTML_FILES_LOCAL,
59                 // PHPPreferencesMessages
60                 // .getString("PHPPreviewProjectPreferences.show_html_files_local"),
61                 // composite));
62                 // addField(new BooleanFieldEditor(
63                 // IPreferenceConstants.PHP_SHOW_XML_FILES_LOCAL, PHPPreferencesMessages
64                 // .getString("PHPPreviewProjectPreferences.show_xml_files_local"),
65                 // composite));
66                 // if (!isPropertyPage)) {
67                 //
68                 // }
69         }
70
71         /*
72          * (non-Javadoc)
73          * 
74          * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
75          */
76         protected IPreferenceStore doGetPreferenceStore() {
77                 return WebUI.getDefault().getPreferenceStore();
78         }
79
80         /*
81          * (non-Javadoc)
82          * 
83          * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
84          */
85         public void init(IWorkbench workbench) {
86                 setDescription("Default entries for Previewer.");
87         }
88 }