added textArea as a temporary report area. will be replaced by a tree at some point...
authorshleh <shleh>
Thu, 27 May 2004 05:25:04 +0000 (05:25 +0000)
committershleh <shleh>
Thu, 27 May 2004 05:25:04 +0000 (05:25 +0000)
defining class skeleton.

net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/PHPUnitView.java

index 5d8e181..94605d5 100644 (file)
@@ -4,8 +4,15 @@ package net.sourceforge.phpeclipse.phpunit;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.part.ViewPart;
 
+/**
+ * @author Ali Echihabi
+ *
+ * To change the template for this generated type comment go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
 /*
  * Created on May 22, 2004
  *
@@ -45,6 +52,7 @@ public class PHPUnitView extends ViewPart {
        Label labelErrors, labelErrorsVal;
        Label labelFailures, labelFailuresVal;
        
+       Text reportArea; // TODO: replace with Tree display like JUnit
 
        public PHPUnitView() {
                
@@ -68,16 +76,33 @@ public class PHPUnitView extends ViewPart {
                labelErrorsVal = new Label(parent, SWT.WRAP);
                labelErrorsVal.setText("0");
 
+               reportArea = new Text(parent, SWT.MULTI | SWT.BORDER |
+               SWT.WRAP | SWT.V_SCROLL | SWT.READ_ONLY);
+               
+               // TODO layout!
        }
 
        /* (non-Javadoc)
         * @see org.eclipse.ui.IWorkbenchPart#setFocus()
         */
        public void setFocus() {
-               
+               markTestPass("hello");
        }
 
-
+       /**
+        * mark the given test as passed in the GUI.
+        * 
+        * @param testID
+        */
+       private void markTestPass(String testID) {
+               
+               // testid, use it in hashmap to retrieve tree item of test and
+               // change icon color, increment pass counter, etc...
+               
+               
+               //for now:
+               reportArea.append("test passed");
+       }