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 //if (!isPropertyPage)) {
53 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
55 protected IPreferenceStore doGetPreferenceStore() {
56 return PHPeclipsePlugin.getDefault().getPreferenceStore();
61 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
63 public void init(IWorkbench workbench) {
64 setDescription("Default entries for Previewer.");