Fixed imports to refer to Quantum DB 2.4.5 instead of the Quantum DB CVS HEAD.
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / preferences / PHPUnitPreferencePage.java
1 /*************************************************************************
2  * @author Ali Echihabi (ali_echihabi@ieee.org, ali.echihabi@souss.ca)
3  *
4  * Plugin for PHP unit Testing.
5  * www.phpeclipse.de
6  * 
7  *************************************************************************/
8
9
10 package net.sourceforge.phpeclipse.phpunit.preferences;
11
12 import net.sourceforge.phpeclipse.phpunit.PHPUnitPlugin;
13
14 import org.eclipse.jface.preference.DirectoryFieldEditor;
15 import org.eclipse.jface.preference.FieldEditorPreferencePage;
16 import org.eclipse.jface.preference.IPreferenceStore;
17 import org.eclipse.ui.IWorkbench;
18 import org.eclipse.ui.IWorkbenchPreferencePage;
19
20 /**
21  * This class represents a preference page that
22  * is contributed to the Preferences dialog. By 
23  * subclassing <samp>FieldEditorPreferencePage</samp>, we
24  * can use the field support built into JFace that allows
25  * us to create a page that is small and knows how to 
26  * save, restore and apply itself.
27  * <p>
28  * This page is used to modify preferences only. They
29  * are stored in the preference store that belongs to
30  * the main plug-in class. That way, preferences can
31  * be accessed directly via the preference store.
32  */
33
34 public class PHPUnitPreferencePage
35         extends FieldEditorPreferencePage
36         implements IWorkbenchPreferencePage {
37                 
38                 
39         public static final String PHPUNIT_PATH = "PHPUnitPathPreference";
40
41
42         public PHPUnitPreferencePage() {
43                 super(GRID);
44                 setPreferenceStore(PHPUnitPlugin.getDefault().getPreferenceStore());
45                 setDescription("Please browse for the folder containing the PHPUnit files (among them: \"phpunit.php\" and \"socketTestResult.php\"). If you don't have it, please download the latest version from http://sourceforge.net/projects/phpunit/ first. ");
46                 initializeDefaults();
47         }
48 /**
49  * Sets the default values of the preferences.
50  */
51         private void initializeDefaults() {
52                 IPreferenceStore store = getPreferenceStore();
53
54         }
55         
56 /**
57  * Creates the field editors. Field editors are abstractions of
58  * the common GUI blocks needed to manipulate various types
59  * of preferences. Each field editor knows how to save and
60  * restore itself.
61  */
62
63         public void createFieldEditors() {
64
65                 addField(new DirectoryFieldEditor(PHPUNIT_PATH, 
66                                 "&PHPUnit Path:", getFieldEditorParent()));
67                         
68
69
70         }
71         
72         public void init(IWorkbench workbench) {
73                 
74         }
75 }