1 package net.sourceforge.phpeclipse.ui.preferences;
3 import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
4 import net.sourceforge.phpeclipse.ui.WebUI;
5 import net.sourceforge.phpeclipse.ui.overlaypages.FieldEditorOverlayPage;
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;
15 * This page will be added to the project's property page dialog when the
16 * "Properties..." popup menu item is selected
18 public class PHPPreviewProjectPreferences extends FieldEditorOverlayPage
19 implements IWorkbenchPreferencePage {
20 public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences";
22 public PHPPreviewProjectPreferences() {
29 * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
31 protected String getPageId() {
38 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
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"),
47 addField(new BooleanFieldEditor(
48 IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT,
49 PHPPreferencesMessages
50 .getString("PHPPreviewProjectPreferences.bring_to_top_preview"),
52 // addField(new BooleanFieldEditor(
53 // IPreferenceConstants.PHP_SHOW_HTML_FILES_LOCAL,
54 // PHPPreferencesMessages
55 // .getString("PHPPreviewProjectPreferences.show_html_files_local"),
57 // addField(new BooleanFieldEditor(
58 // IPreferenceConstants.PHP_SHOW_XML_FILES_LOCAL, PHPPreferencesMessages
59 // .getString("PHPPreviewProjectPreferences.show_xml_files_local"),
61 // if (!isPropertyPage)) {
69 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
71 protected IPreferenceStore doGetPreferenceStore() {
72 return WebUI.getDefault().getPreferenceStore();
78 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
80 public void init(IWorkbench workbench) {
81 setDescription("Default entries for Previewer.");