Merge branch 'master' of github.com:cbeust/testng
diff --git a/3rdparty/cobertura.jar b/3rdparty/cobertura.jar
new file mode 100644
index 0000000..438fe55
--- /dev/null
+++ b/3rdparty/cobertura.jar
Binary files differ
diff --git a/3rdparty/doclava-1.0.3.jar b/3rdparty/doclava-1.0.3.jar
new file mode 100644
index 0000000..c261657
--- /dev/null
+++ b/3rdparty/doclava-1.0.3.jar
Binary files differ
diff --git a/CHANGES.txt b/CHANGES.txt
index 17a4f98..df64e25 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -25,6 +25,7 @@
 
 Eclipse:
 
+Added: New quick fix "Add static import org.testng.AssertJUnit.assertXXX"
 Added: New workspace wide setting: excluded stack traces, to provide shorter stack traces in the view
 Added: New "Clear results" icon in the tool bar
 Added: When the search filter is modified, don't update the tree live if it is too big 
@@ -33,6 +34,7 @@
 Added: JUnit conversion: assertArrayEquals()
 Added: JUnit conversion: @RunWith(Parameterized.class)
 Added: Support for Hamcrest failed assertions in the compare dialog
+Fixed: The tree was incorrect if the same class is used in different <test> tags
 Fixed: When creating a new Run/Debug configuration, "Launch.label" was displayed
 Fixed: TESTNG-459: TestNG menu should not always be present in context menu (Mykola Nikishov)
 Fixed: Performance problems in the plug-in
diff --git a/build-tests.xml b/build-tests.xml
index 0622fec..d26c3ca 100644
--- a/build-tests.xml
+++ b/build-tests.xml
@@ -51,11 +51,22 @@
              classpath="${build.dir}"/>
   </target>
 
-  <!-- ==================================================================== -->
+  <property name="cobertura.dir" value="../cobertura-1.9.4.1" />
+
+  <path id="cobertura.classpath">
+      <fileset dir="${cobertura.dir}">
+          <include name="cobertura.jar" />
+          <include name="lib/**/*.jar" />
+      </fileset>
+  </path>
+
+	<!-- ==================================================================== -->
   <!-- Run                                                             -->
   <!-- ==================================================================== -->
 
   <path id="run.cp">
+  	<path location="target/instrumented-classes" />
+  	<path refid="cobertura.classpath" />
     <path refid="compile.cp"/>
     <pathelement location="${test.build.dir}"/>
   </path>
diff --git a/build.xml b/build.xml
index bff1bc3..ff11b91 100644
--- a/build.xml
+++ b/build.xml
@@ -128,7 +128,47 @@
   <!-- Documentation                                                        -->

   <!-- ==================================================================== -->

 

-  <target name="javadocs">

+  <target name="javadocs" depends="javadocs-current" />

+

+  <target name="doclava">

+    <javadoc

+      docletpath="3rdparty/doclava-1.0.3.jar"

+      bootclasspath="${javahome}/jre/lib/rt.jar"

+      classpath="${testng.jar}:lib/${ant.jar}:lib/${guice2.jar}:lib/aopalliance-1.0.jar"

+      maxmemory="2048M"

+      additionalparam="-quiet"

+      verbose="false"

+      destdir="javadocs"

+      >

+      <fileset dir="${src.dir}" defaultexcludes="yes">

+        <include name="org/testng/*.java" />

+      </fileset>

+      <fileset dir="${src.dir}" defaultexcludes="yes">

+        <include name="org/testng/xml/Xml*.java" />

+      </fileset>

+      <fileset dir="${src.dir}" defaultexcludes="yes">

+        <include name="org/testng/annotations/**" />

+      </fileset>

+      <doclet name="com.google.doclava.Doclava">

+        <param name="-stubs" value="build/stubs" />

+        <param name="-hdf"/>

+	<param name="project.name" value="TestNG" />

+        <!-- versioning -->

+        <param name="-since"/>

+	<param name="doclava/previous.xml"/>

+	<param name="v1" />

+        <param name="-apiversion" value="v2"/>

+        <!-- federation -->

+        <param name="-federate" />

+	<param name="JDK"/>

+        <param name="http://download.oracle.com/javase/6/docs/api/index.html?"/>

+        <param name="-federationxml"/><param name="JDK"/>

+        <param name="http://doclava.googlecode.com/svn/static/api/openjdk-6.xml"/>

+      </doclet>

+    </javadoc>

+  </target>

+

+  <target name="javadocs-current">

     <javadoc additionalparam="-quiet" destdir="javadocs" source="1.5" windowtitle="TestNG"

       classpath="${testng.jar}" classpathref="compile2.cp" verbose="false">

       <fileset dir="${src.dir}" defaultexcludes="yes">

@@ -347,7 +387,8 @@
   <!-- ==================================================================== -->

   <!-- Ivy                                                                  -->

   <!-- ==================================================================== -->

-  <target name="retrieve-dependencies" description="Retrieve dependencies with ivy">

+

+	<target name="retrieve-dependencies" description="Retrieve dependencies with ivy">

     <ivy:retrieve log="quiet" />

   </target>

 

@@ -361,5 +402,32 @@
   <target name="pom">

     <ivy:makepom ivyfile="ivy.xml" pomfile="ivy-pom.xml" />

   </target>

-      

+

+  <!-- ==================================================================== -->

+  <!-- Code coverage                                                        -->

+  <!-- ==================================================================== -->

+

+	<property name="cobertura.dir" value="../cobertura-1.9.4.1" />

+

+	<path id="cobertura.classpath">

+	    <fileset dir="${cobertura.dir}">

+	        <include name="cobertura.jar" />

+	        <include name="lib/**/*.jar" />

+	    </fileset>

+	</path>

+

+	<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />

+

+  <target name="coverage:create">

+  	<cobertura-instrument classpath="cobertura-1.9.4.1/lib/*" todir="target/instrumented-classes">

+  		<fileset dir="${build.dir}">

+  		  <include name="**/*.class" />

+	    </fileset>

+	  </cobertura-instrument>

+	</target>

+

+	<target name="coverage">

+	  <cobertura-report srcdir="${src.dir}" destdir="target/coverage-report"/>

+	</target>

+

 </project>

diff --git a/doc/eclipse.html b/doc/eclipse.html
index 68233a3..d8b9ce6 100644
--- a/doc/eclipse.html
+++ b/doc/eclipse.html
@@ -42,6 +42,8 @@
 <br>
 &nbsp;&nbsp;<a class="summary" href="#eclipse-quickfix">7 - Converting JUnit tests</a>
 <br>
+&nbsp;&nbsp;<a class="summary" href="#eclipse-quickfixes">8 - Quick fixes</a>
+<br>
 &nbsp;&nbsp;<a class="summary" href="#testng-xml"></a>
 
 <!--
@@ -239,6 +241,35 @@
 <img border="0" src="http://beust.com/pics/menu-convert4.png" />
 </p>
 
+<h3><a name="eclipse-quickfixes">8 - Quick fixes</a></h3>
+
+The TestNG Eclipse plug-in offers several quick fixes while you are editing a TestNG class (accessible with <tt>Ctrl-1</tt> on Windows/Linux and <tt>&#8984;-1</tt> on Mac OS):
+
+<h4>Convert to JUnit</h4>
+
+This was covered in the <a href="#eclipse-quickfix"> previous section</a>.
+
+<h4>Pushing and pulling <tt>@Test</tt> annotations</h4>
+
+If you have several test methods annotated with <tt>@Test</tt> and you'd like to replace them all with a single <tt>@Test</tt> annotation at the class level, choose the "Pull annotation" quick fix:
+
+<p align="center">
+<img border="0" src="http://testng.org/pictures/refactoring-pull-annotation.png" />
+</p>
+
+Reciprocally, you can move a class level <tt>@Test</tt> annotation onto all your public methods:
+
+<p align="center">
+<img border="0" src="http://testng.org/pictures/refactoring-push-annotation.png" />
+</p>
+
+<h4>Automatically importing <tt>asserts</tt></h4>
+
+Apply a quick fix on an assert method to automatically import it:
+
+<p align="center">
+<img border="0" src="http://testng.org/pictures/quickfix-import.png" />
+</p>