Fix #1475484 - code formatter: bad result for array() embedding func calls
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / preferences / PHPMiscProjectPreferences.java
1 package net.sourceforge.phpeclipse.ui.preferences;
2
3 import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
4 import net.sourceforge.phpeclipse.ui.WebUI;
5 import net.sourceforge.phpeclipse.ui.overlaypages.FieldEditorOverlayPage;
6
7 import org.eclipse.jface.preference.IPreferenceStore;
8 import org.eclipse.jface.preference.PathEditor;
9 import org.eclipse.jface.preference.StringFieldEditor;
10 import org.eclipse.swt.widgets.Composite;
11 import org.eclipse.ui.IWorkbench;
12 import org.eclipse.ui.IWorkbenchPreferencePage;
13
14 /**
15  * 
16  * This page will be added to the project's property page dialog when the
17  * "Properties..." popup menu item is selected
18  */
19 public class PHPMiscProjectPreferences extends FieldEditorOverlayPage implements
20                 IWorkbenchPreferencePage, IMiscProjectPreferences {
21
22         public final static String PREF_ID = "net.sourceforge.phpeclipse.preferences.PHPMiscProjectPreferences";
23
24         public PHPMiscProjectPreferences() {
25                 super(GRID);
26         }
27
28         /*
29          * (non-Javadoc)
30          * 
31          * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId()
32          */
33         protected String getPageId() {
34                 return PREF_ID;
35         }
36
37         protected void createFieldEditors() {
38                 Composite composite = getFieldEditorParent();
39
40                 addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF,
41                                 PHPPreferencesMessages
42                                                 .getString("PHPMiscProjectPreferences.localhost"),
43                                 composite));
44                 // addField(new
45                 // StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT,
46                 // PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"),
47                 // composite));
48                 addField(new StringFieldEditor(
49                                 IPreferenceConstants.PHP_DOCUMENTROOT_PREF,
50                                 PHPPreferencesMessages
51                                                 .getString("PHPMiscProjectPreferences.documentroot"),
52                                 composite));
53
54                 PathEditor pe = new PathEditor(IPreferenceConstants.PHP_INCLUDE_PATHS,
55                                 PHPPreferencesMessages
56                                                 .getString("PHPMiscProjectPreferences.include_paths"),
57                                 "Choose Path...", composite);
58                 addField(pe);
59
60                 // if (!isPropertyPage)) {
61                 //
62                 // }
63         }
64
65         /*
66          * (non-Javadoc)
67          * 
68          * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
69          */
70         protected IPreferenceStore doGetPreferenceStore() {
71                 return WebUI.getDefault().getPreferenceStore();
72         }
73
74         /*
75          * (non-Javadoc)
76          * 
77          * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
78          */
79         public void init(IWorkbench workbench) {
80                 setDescription("Default entries for PHP projects.");
81         }
82 }