Permalink
Browse files

Update for upcoming 5.9.0.0 release.

  • Loading branch information...
1 parent 417a3ad commit d1502d592671ff9f9630ca2218b79a7fd39db235 cbeust committed Mar 30, 2009
View
@@ -43,6 +43,7 @@
<condition property="pluginTemp" value="${build.dir}/plugins">
<isset property="build.dir"/>
</condition>
+ <echo message="a.plugin.xml build.dir=${build.dir}; plugin.version=${plugin.version} --------------------"/>
<property name="pluginTemp" value="${basedir}"/>
<condition property="build.result.folder" value="${pluginTemp}/org.testng.eclipse_${plugin.version}">
<isset property="build.dir"/>
View
@@ -20,6 +20,9 @@ Fixes TESTNG-245
Rev.101
Fixes TESTNG-246 eclipse plugin needs automated build
+
+Rev.104
+ Dan Fabulich's patches for testng184 and testng233
View
@@ -3,8 +3,8 @@
<plugin
id="org.testng.eclipse"
name="TestNG"
- version="5.8.0.4"
- provider-name="Alex Popescu"
+ version="5.9.0.2"
+ provider-name="Cedric Beust"
class="org.testng.eclipse.TestNGPlugin">
<runtime>
<library name="eclipse-testng.jar">
@@ -41,18 +41,6 @@
<viewerContribution
id="testng.editor.popup"
targetID="#CompilationUnitEditorContext" >
- <action
- id="testng.debug.popup.action"
- label="Debug as test"
- menubarPath="testng.editor.menu/content"
- class="org.testng.eclipse.launch.DebugEditorLaunchDelegate">
- </action>
- <action
- id="testng.run.popup.action"
- label="Run as test"
- menubarPath="testng.editor.menu/content"
- class="org.testng.eclipse.launch.RunEditorLaunchDelegate">
- </action>
<menu
id="testng.editor.menu"
label="TestNG"
@@ -10,6 +10,7 @@
import org.eclipse.jdt.core.IType;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.testng.eclipse.util.LaunchUtil;
@@ -37,6 +38,11 @@ else if(obj instanceof IAdaptable) {
}
public void launch(IEditorPart editor, String mode) {
+ IEditorInput input = editor.getEditorInput();
+ IJavaElement element = (IJavaElement) input.getAdapter(IJavaElement.class);
+ if (element != null) {
+ run(element, mode);
+ }
}
protected void run(IJavaElement ije, String mode) {
@@ -2,7 +2,7 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
-import org.eclipse.jdt.internal.ui.text.correction.ASTRewriteCorrectionProposal;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ASTRewriteCorrectionProposal;
import org.testng.eclipse.launch.TestNGMainTab;
/**
@@ -140,6 +140,12 @@ private static Map findParameterValues(IResource projectRes, Map parameters) {
IResource[] suiteFiles= searchSuites(new IResource[] {projectRes});
IFile selectedSuite= null;
+ if (suiteFiles.length == 0) {
+ // No parameters. If they're all @Optional, this will work anyway.
+ // Otherwise, this will ultimately cause the test to fail with a clear error.
+ return new HashMap();
+ }
+
if(suiteFiles.length > 1) {
selectedSuite= showSelectionDialog(suiteFiles);
}
@@ -199,7 +205,6 @@ protected static IFile showSelectionDialog(IResource[] choices) {
return null;
}
final Shell parent = window.getShell();
- final IContainer input = ResourcesPlugin.getWorkspace().getRoot();
final SuiteListSelectionDialog dialog = new SuiteListSelectionDialog(parent, choices);
dialog.setTitle("Select parameter definition file");
@@ -8,7 +8,7 @@
</target>
<target name="all.plugins" depends="init">
- <ant antfile="build.xml" dir="${plugin.dir}" target="${target}">
+ <ant antfile="autobuild.plugin.xml" dir="${plugin.dir}" target="${target}" inheritAll="true">
</ant>
</target>
<target name="all.features" depends="init">
@@ -1,5 +1,5 @@
# Plugin and feature version.
-version=5.8.0.4
+version=5.8.0.4a
# Adjust for the location of eclipse on the lccal machine.
eclipse.dir=/opt/eclipse
@@ -67,6 +67,7 @@
<eclipse-ant working.dir="${feature.dir}" antfile="autobuild.feature.xml" >
<arg value="-Dfeature.version=${version}"/>
<arg value="-Dplugin.dir=${plugin.dir}"/>
+ <arg value="-Dplugin.version=${version}"/>
<arg value="-Declipse.dir=${eclipse.dir}"/>
<arg value="-Dbuild.dir=${build.dir}/features"/>
<arg value="-DbaseLocation=${eclipse.dir}"/>

0 comments on commit d1502d5

Please sign in to comment.