moving report handling related classes to own package + other minor changes.
[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 org.eclipse.jface.preference.*;
13 import org.eclipse.ui.IWorkbenchPreferencePage;
14 import org.eclipse.ui.IWorkbench;
15 import net.sourceforge.phpeclipse.phpunit.PHPUnitPlugin;
16 import org.eclipse.jface.preference.IPreferenceStore;
17
18 /**
19  * This class represents a preference page that
20  * is contributed to the Preferences dialog. By 
21  * subclassing <samp>FieldEditorPreferencePage</samp>, we
22  * can use the field support built into JFace that allows
23  * us to create a page that is small and knows how to 
24  * save, restore and apply itself.
25  * <p>
26  * This page is used to modify preferences only. They
27  * are stored in the preference store that belongs to
28  * the main plug-in class. That way, preferences can
29  * be accessed directly via the preference store.
30  */
31
32 public class PHPUnitPreferencePage
33         extends FieldEditorPreferencePage
34         implements IWorkbenchPreferencePage {
35                 
36                 
37         public static final String PHPUNIT_PATH = "PHPUnitPathPreference";
38
39
40         public PHPUnitPreferencePage() {
41                 super(GRID);
42                 setPreferenceStore(PHPUnitPlugin.getDefault().getPreferenceStore());
43                 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. ");
44                 initializeDefaults();
45         }
46 /**
47  * Sets the default values of the preferences.
48  */
49         private void initializeDefaults() {
50                 IPreferenceStore store = getPreferenceStore();
51
52         }
53         
54 /**
55  * Creates the field editors. Field editors are abstractions of
56  * the common GUI blocks needed to manipulate various types
57  * of preferences. Each field editor knows how to save and
58  * restore itself.
59  */
60
61         public void createFieldEditors() {
62
63                 addField(new DirectoryFieldEditor(PHPUNIT_PATH, 
64                                 "&PHPUnit Path:", getFieldEditorParent()));
65                         
66
67
68         }
69         
70         public void init(IWorkbench workbench) {
71                 
72         }
73 }