Disable "Refresh PHP Browser view when opening editor" and "Show PHP
[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_SHOW_HTML_FILES_LOCAL,
54                 // PHPPreferencesMessages
55                 // .getString("PHPPreviewProjectPreferences.show_html_files_local"),
56                 // composite));
57                 // addField(new BooleanFieldEditor(
58                 // IPreferenceConstants.PHP_SHOW_XML_FILES_LOCAL, PHPPreferencesMessages
59                 // .getString("PHPPreviewProjectPreferences.show_xml_files_local"),
60                 // composite));
61                 // if (!isPropertyPage)) {
62                 //
63                 // }
64         }
65
66         /*
67          * (non-Javadoc)
68          * 
69          * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
70          */
71         protected IPreferenceStore doGetPreferenceStore() {
72                 return WebUI.getDefault().getPreferenceStore();
73         }
74
75         /*
76          * (non-Javadoc)
77          * 
78          * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
79          */
80         public void init(IWorkbench workbench) {
81                 setDescription("Default entries for Previewer.");
82         }
83 }