Prevents the location update and the display of the "location not found" dialog box
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / TestPoolLabelProvider.java
index 1aec92c..40614c3 100644 (file)
@@ -6,7 +6,6 @@
  * 
  *************************************************************************/
 
-
 package net.sourceforge.phpeclipse.phpunit;
 
 import net.sourceforge.phpeclipse.phpunit.testpool.TestCase;
@@ -15,69 +14,64 @@ import net.sourceforge.phpeclipse.phpunit.testpool.TestSuite;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.swt.graphics.Image;
+
 public class TestPoolLabelProvider extends LabelProvider {
 
        public String getText(Object element) {
-               
+
                String text = "";
-               
-               if(element instanceof TestSuite) 
-                       return ((TestSuite)element).getName();
-               else if(element instanceof TestCase) {
-               
-                       text = ((TestCase)element).getTestName();
-                       
-                       //has the form: TESTSUITENAME_TESTNAME
-                       
-               }
-               else
+
+               if (element instanceof TestSuite)
+                       return ((TestSuite) element).getName();
+               else if (element instanceof TestCase) {
+
+                       text = ((TestCase) element).getTestName();
+
+                       // has the form: TESTSUITENAME_TESTNAME
+
+               } else
                        text = "UNKNOWN ELEMENT TYPE";
-               
+
                return text;
-               
+
        }
 
        public Image getImage(Object element) {
-               
+
                Image image = null;
                ImageDescriptor descriptor = null;
-                       
-               if(element instanceof TestSuite) {
-                       
-                       TestSuite suite = (TestSuite)element;
-                       descriptor = PHPUnitImages.DESC_TEST_SUITE_PASS;
 
+               if (element instanceof TestSuite) {
+
+                       TestSuite suite = (TestSuite) element;
+                       descriptor = PHPUnitImages.DESC_TEST_SUITE_PASS;
 
-                       if(suite.hasError())
+                       if (suite.hasError())
                                descriptor = PHPUnitImages.DESC_TEST_SUITE_ERROR;
-                       else if(suite.hasFailure())
+                       else if (suite.hasFailure())
                                descriptor = PHPUnitImages.DESC_TEST_SUITE_FAILURE;
-                       else if(suite.isAllPass())
+                       else if (suite.isAllPass())
                                descriptor = PHPUnitImages.DESC_TEST_SUITE_PASS;
-                                       
-                                                               
-               } else if(element instanceof TestCase) {
-                       
-                       TestCase test = (TestCase)element;
-                       
+
+               } else if (element instanceof TestCase) {
+
+                       TestCase test = (TestCase) element;
+
                        descriptor = PHPUnitImages.DESC_TEST_PASS;
-                       
-                       if(test.isError())
+
+                       if (test.isError())
                                descriptor = PHPUnitImages.DESC_TEST_ERROR;
-                       else if(test.isFailure())
+                       else if (test.isFailure())
                                descriptor = PHPUnitImages.DESC_TEST_FAILURE;
-                       else if(test.isPass())
+                       else if (test.isPass())
                                descriptor = PHPUnitImages.DESC_TEST_PASS;
-                                       
+
                }
-               
+
                image = descriptor.createImage();
-       
-               
+
                return image;
-               
+
        }
 
 }