initial addition of PHPUnit main view.
authorshleh <shleh>
Wed, 26 May 2004 04:01:39 +0000 (04:01 +0000)
committershleh <shleh>
Wed, 26 May 2004 04:01:39 +0000 (04:01 +0000)
net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/PHPUnitView.java [new file with mode: 0644]

diff --git a/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/PHPUnitView.java b/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/PHPUnitView.java
new file mode 100644 (file)
index 0000000..5d8e181
--- /dev/null
@@ -0,0 +1,88 @@
+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.ui.part.ViewPart;
+
+/*
+ * Created on May 22, 2004
+ *
+ * To change the template for this generated file go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+
+/**
+ * @author Ali Echihabi (ali_echihabi@ieee.org)
+ *
+ * Plugin for PHP unit Testing.
+ * www.phpeclipse.de
+ * 
+ * This the main view showing the progress and reports.
+ * 
+ */
+
+
+public class PHPUnitView extends ViewPart {
+
+       /*
+        * like J Unit
+        * a tree.
+        * The first level nodes are the test suites.
+        * children are nested test suites.
+        * leafs: test functions.
+        */
+       
+       
+       private int numTests; // total number of tests
+       private int numTestsRun; // number of tests run so far
+       private int numFailures; // number of failures so far
+       private int numErrors; // number of errors so far
+       private int numPasses; // number of passes so far (they should add up)   
+
+       Label labelRuns, labelRunsVal; // Runs: 12
+       Label labelErrors, labelErrorsVal;
+       Label labelFailures, labelFailuresVal;
+       
+
+       public PHPUnitView() {
+               
+       }
+       
+       public void createPartControl(Composite parent) {
+               
+               //viewer = new TreeViewer(parent);
+               labelRuns = new Label(parent, SWT.WRAP);
+               labelRuns.setText("Runs: ");
+               labelRunsVal = new Label(parent, SWT.WRAP);
+               labelRunsVal.setText("0 / 0");
+               
+               labelFailures = new Label(parent, SWT.WRAP);
+               labelFailures.setText("Failures: ");
+               labelFailuresVal = new Label(parent, SWT.WRAP);
+               labelFailuresVal.setText("0");
+               
+               labelErrors = new Label(parent, SWT.WRAP);
+               labelErrors.setText("Errors: ");
+               labelErrorsVal = new Label(parent, SWT.WRAP);
+               labelErrorsVal.setText("0");
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IWorkbenchPart#setFocus()
+        */
+       public void setFocus() {
+               
+       }
+
+
+
+       
+       
+       
+       
+       
+
+}