1) Changed indentation of (single or double) quoted strings to align on the first...
[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 package net.sourceforge.phpeclipse.phpunit.preferences;
10
11 //import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
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 is contributed to the
22  * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>,
23  * we can use the field support built into JFace that allows us to create a page
24  * that is small and knows how to save, restore and apply itself.
25  * <p>
26  * This page is used to modify preferences only. They are stored in the
27  * preference store that belongs to the main plug-in class. That way,
28  * preferences can be accessed directly via the preference store.
29  */
30
31 public class PHPUnitPreferencePage extends FieldEditorPreferencePage implements
32                 IWorkbenchPreferencePage {
33
34         public static final String PHPUNIT_PATH = "PHPUnitPathPreference";
35
36         public PHPUnitPreferencePage() {
37                 super(GRID);
38                 
39         if (PHPUnitPlugin.getDefault () != null) {
40             setPreferenceStore (PHPUnitPlugin.getDefault().getPreferenceStore());
41         }
42         
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         /**
48          * Sets the default values of the preferences.
49          */
50 //      private void initializeDefaults() {
51 //              //IPreferenceStore store = getPreferenceStore();
52 //
53 //      }
54
55         /**
56          * Creates the field editors. Field editors are abstractions of the common
57          * GUI blocks needed to manipulate various types of preferences. Each field
58          * editor knows how to save and restore itself.
59          */
60
61         public void createFieldEditors() {
62
63                 addField(new DirectoryFieldEditor(PHPUNIT_PATH, "&PHPUnit Path:",
64                                 getFieldEditorParent()));
65
66         }
67
68         public void init(IWorkbench workbench) {
69
70         }
71 }