getting the path to phpunit from a preference page. added icons to progressComposite
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / PHPUnitView.java
index e304352..765b4a9 100644 (file)
@@ -7,6 +7,7 @@ import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 
+import net.sourceforge.phpeclipse.phpunit.preferences.PHPUnitPreferencePage;
 import net.sourceforge.phpeclipse.phpunit.testpool.TestCase;
 import net.sourceforge.phpeclipse.phpunit.testpool.TestPool;
 import net.sourceforge.phpeclipse.phpunit.testpool.TestSuite;
@@ -278,9 +279,11 @@ public class PHPUnitView extends ViewPart {
 
                out.write("<?php" + "\n");
                out.write("ob_start();" + "\n");
+                               
+               String path = PHPUnitPlugin.getDefault().getPreferenceStore().getString(PHPUnitPreferencePage.PHPUNIT_PATH);
+
                
-               //TODO: use install dir for path to phpunit. include it with plugin.
-               out.write("$path = \"C:/Documents and Settings/Ali Echihabi/My Documents/workspace.eclipse2.1/PHPUnit/phpunit\";" + "\n");
+               out.write("$path = \"" + path + "\";" + "\n");
                
                out.write("include_once($path . \"/phpunit_test.php\");" + "\n");
                out.write("include_once $path . \"/socketTestResult.php\";" + "\n");