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_STICKY_BROWSER_URL_DEFAULT,
54 PHPPreferencesMessages
55 .getString("PHPPreviewProjectPreferences.sticky_browser_url"),
57 // addField(new BooleanFieldEditor(
58 // IPreferenceConstants.PHP_SHOW_HTML_FILES_LOCAL,
59 // PHPPreferencesMessages
60 // .getString("PHPPreviewProjectPreferences.show_html_files_local"),
62 // addField(new BooleanFieldEditor(
63 // IPreferenceConstants.PHP_SHOW_XML_FILES_LOCAL, PHPPreferencesMessages
64 // .getString("PHPPreviewProjectPreferences.show_xml_files_local"),
66 // if (!isPropertyPage)) {
74 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
76 protected IPreferenceStore doGetPreferenceStore() {
77 return WebUI.getDefault().getPreferenceStore();
83 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
85 public void init(IWorkbench workbench) {
86 setDescription("Default entries for Previewer.");