1 package net.sourceforge.phpeclipse.preferences;
2 import net.sourceforge.phpeclipse.IPreferenceConstants;
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
5 import org.eclipse.jface.preference.BooleanFieldEditor;
6 import org.eclipse.jface.preference.IPreferenceStore;
7 import org.eclipse.swt.widgets.Composite;
8 import org.eclipse.ui.IWorkbench;
9 import org.eclipse.ui.IWorkbenchPreferencePage;
11 import net.sourceforge.phpeclipse.overlaypages.FieldEditorOverlayPage;
14 * This page will be added to the project's property page dialog when the
15 * "Properties..." popup menu item is selected
17 public class PHPPreviewProjectPreferences extends FieldEditorOverlayPage
19 IWorkbenchPreferencePage {
20 public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences";
22 public PHPPreviewProjectPreferences() {
28 * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
30 protected String getPageId() {
36 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
38 protected void createFieldEditors() {
39 Composite composite = getFieldEditorParent();
40 addField(new BooleanFieldEditor(
41 IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT, PHPPreferencesMessages
42 .getString("PHPPreviewProjectPreferences.auto_preview"), composite));
43 addField(new BooleanFieldEditor(
44 IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT, PHPPreferencesMessages
45 .getString("PHPPreviewProjectPreferences.bring_to_top_preview"), composite));
46 addField(new BooleanFieldEditor(
47 IPreferenceConstants.PHP_SHOW_HTML_FILES_LOCAL, PHPPreferencesMessages
48 .getString("PHPPreviewProjectPreferences.show_html_files_local"), composite));
49 //if (!isPropertyPage)) {
56 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
58 protected IPreferenceStore doGetPreferenceStore() {
59 return PHPeclipsePlugin.getDefault().getPreferenceStore();
64 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
66 public void init(IWorkbench workbench) {
67 setDescription("Default entries for Previewer.");