1) Fixed issue #858: OpenPHPPerspectiveAction error when creating a new PHP project.
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / preferences / PHPUnitPreferencePage.java
index 6f6d150..8d8c1eb 100644 (file)
@@ -8,11 +8,12 @@
 
 package net.sourceforge.phpeclipse.phpunit.preferences;
 
+//import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
 import net.sourceforge.phpeclipse.phpunit.PHPUnitPlugin;
 
 import org.eclipse.jface.preference.DirectoryFieldEditor;
 import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
+//import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 
@@ -34,7 +35,11 @@ public class PHPUnitPreferencePage extends FieldEditorPreferencePage implements
 
        public PHPUnitPreferencePage() {
                super(GRID);
-               setPreferenceStore(PHPUnitPlugin.getDefault().getPreferenceStore());
+               
+        if (PHPUnitPlugin.getDefault () != null) {
+            setPreferenceStore (PHPUnitPlugin.getDefault().getPreferenceStore());
+        }
+        
                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. ");
                //initializeDefaults();
        }