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;
6 import org.eclipse.jface.preference.BooleanFieldEditor;
7 import org.eclipse.jface.preference.IPreferenceStore;
8 import org.eclipse.swt.widgets.Composite;
9 import org.eclipse.ui.IWorkbench;
10 import org.eclipse.ui.IWorkbenchPreferencePage;
13 * This page will be added to the project's property page dialog when the
14 * "Properties..." popup menu item is selected
16 public class PHPPreviewProjectPreferences extends FieldEditorOverlayPage
18 IWorkbenchPreferencePage {
19 public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences";
21 public PHPPreviewProjectPreferences() {
27 * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
29 protected String getPageId() {
35 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
37 protected void createFieldEditors() {
38 Composite composite = getFieldEditorParent();
39 addField(new BooleanFieldEditor(
40 IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT, PHPPreferencesMessages
41 .getString("PHPPreviewProjectPreferences.auto_preview"), composite));
42 addField(new BooleanFieldEditor(
43 IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT, PHPPreferencesMessages
44 .getString("PHPPreviewProjectPreferences.bring_to_top_preview"), composite));
45 addField(new BooleanFieldEditor(
46 IPreferenceConstants.PHP_SHOW_HTML_FILES_LOCAL, PHPPreferencesMessages
47 .getString("PHPPreviewProjectPreferences.show_html_files_local"), composite));
48 //if (!isPropertyPage)) {
55 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
57 protected IPreferenceStore doGetPreferenceStore() {
58 return WebUI.getDefault().getPreferenceStore();
63 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
65 public void init(IWorkbench workbench) {
66 setDescription("Default entries for Previewer.");