Current php5 doc from www.php.net (english);
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / preferences / PHPPreviewProjectPreferences.java
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;
5
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;
11 /**
12  * 
13  * This page will be added to the project's property page dialog when the
14  * "Properties..." popup menu item is selected
15  */
16 public class PHPPreviewProjectPreferences extends FieldEditorOverlayPage
17     implements
18       IWorkbenchPreferencePage {
19   public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPPreviewProjectPreferences";
20   
21   public PHPPreviewProjectPreferences() {
22     super(GRID, true);
23   }
24   /*
25    * (non-Javadoc)
26    * 
27    * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
28    */
29   protected String getPageId() {
30     return PREF_ID;
31   }
32   /*
33    * (non-Javadoc)
34    * 
35    * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
36    */
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)) {
49     //  
50     //}
51   }
52   /*
53    * (non-Javadoc)
54    * 
55    * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
56    */
57   protected IPreferenceStore doGetPreferenceStore() {
58     return WebUI.getDefault().getPreferenceStore();
59   }
60   /*
61    * (non-Javadoc)
62    * 
63    * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
64    */
65   public void init(IWorkbench workbench) {
66     setDescription("Default entries for Previewer.");
67   }
68 }