Skip to content

Commit

Permalink
Update for upcoming 5.9.0.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeust committed Mar 30, 2009
1 parent 417a3ad commit d1502d5
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 18 deletions.
1 change: 1 addition & 0 deletions autobuild.plugin.xml
Expand Up @@ -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"/>
Expand Down
3 changes: 3 additions & 0 deletions changes.log
Expand Up @@ -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



Expand Down
16 changes: 2 additions & 14 deletions plugin.xml
Expand Up @@ -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">
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions src/main/org/testng/eclipse/launch/TestNGLaunchShortcut.java
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down
Expand Up @@ -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;

/**
Expand Down
7 changes: 6 additions & 1 deletion src/main/org/testng/eclipse/util/param/ParameterSolver.java
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion testng-eclipse-feature/autobuild.feature.xml
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion testng-eclipse-update-site/autobuild.site.properties
@@ -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
Expand Down
1 change: 1 addition & 0 deletions testng-eclipse-update-site/autobuild.site.xml
Expand Up @@ -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}"/>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit d1502d5

Please sign in to comment.