1) Fixed issue #872.
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / TestPoolContentProvider.java
index 96489da..b93d3b2 100644 (file)
@@ -1,62 +1,62 @@
-/*
- * Created on Aug 8, 2004
+/*************************************************************************
+ * @author Ali Echihabi (ali_echihabi@ieee.org, ali.echihabi@souss.ca)
  *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
+ * Plugin for PHP unit Testing.
+ * www.phpeclipse.de
+ * 
+ *************************************************************************/
+
 package net.sourceforge.phpeclipse.phpunit;
 
 import java.util.Vector;
 
-import net.sourceforge.phpeclipse.phpunit.testpool.*;
+import net.sourceforge.phpeclipse.phpunit.testpool.TestCase;
+import net.sourceforge.phpeclipse.phpunit.testpool.TestSuite;
 
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.Viewer;
 
-/**
- * @author Ali Echihabi
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
 public class TestPoolContentProvider implements ITreeContentProvider {
 
-
-
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
         */
        public Object[] getChildren(Object parentElement) {
 
-               if(parentElement instanceof TestSuite) {
+               if (parentElement instanceof TestSuite) {
 
                        Vector allChildren = new Vector();
-                       allChildren.addAll(((TestSuite)parentElement).getTestCases());
-                       allChildren.addAll(((TestSuite)parentElement).getTestSuites());
-                       
+                       allChildren.addAll(((TestSuite) parentElement).getTestCases());
+                       allChildren.addAll(((TestSuite) parentElement).getTestSuites());
+
                        return allChildren.toArray();
-                       
+
                } else {
                        return new Object[0];
                }
-               
-               
+
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
         */
        public Object getParent(Object element) {
-               
-               if(element instanceof TestSuite)
-                       return ((TestSuite)element).getParent();
-               else if (element instanceof TestCase) 
-                       return ((TestCase)element).getParentSuite();
+
+               if (element instanceof TestSuite)
+                       return ((TestSuite) element).getParent();
+               else if (element instanceof TestCase)
+                       return ((TestCase) element).getParentSuite();
                else
                        return null;
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
         */
        public boolean hasChildren(Object element) {
@@ -64,24 +64,31 @@ public class TestPoolContentProvider implements ITreeContentProvider {
                return getChildren(element).length > 0;
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
         */
        public Object[] getElements(Object inputElement) {
-               
+
                return getChildren(inputElement);
-               
+
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.jface.viewers.IContentProvider#dispose()
         */
        public void dispose() {
-               
+
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
+        *      java.lang.Object, java.lang.Object)
         */
        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
                // TODO Auto-generated method stub