|
From: <caw...@us...> - 2007-05-07 14:29:27
|
Revision: 2441
http://svn.sourceforge.net/rubyeclipse/?rev=2441&view=rev
Author: cawilliams
Date: 2007-05-07 07:29:24 -0700 (Mon, 07 May 2007)
Log Message:
-----------
make some changes to make it easier for RadRails to subclass this and gain more behavior for creating test launch configurations for it's test all/test units/test functionals buttons which invoke files outside the workspace.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java 2007-05-07 13:31:50 UTC (rev 2440)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java 2007-05-07 14:29:24 UTC (rev 2441)
@@ -126,6 +126,10 @@
}
protected ILaunchConfiguration createConfiguration(IFile rubyFile, String container, String testName) {
+ return createConfiguration(rubyFile.getLocation().toOSString(), container, rubyFile.getProject(), testName);
+ }
+
+ protected ILaunchConfiguration createConfiguration(String rubyFile, String container, IProject project, String testName) {
if (RubyRuntime.getDefaultVMInstall() == null) {
showNoInterpreterDialog();
return null;
@@ -134,10 +138,10 @@
ILaunchConfiguration config = null;
try {
ILaunchConfigurationType configType = getRubyLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(rubyFile.getName()));
- wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, rubyFile.getProject().getName());
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(rubyFile));
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME, TestUnitLaunchConfigurationDelegate.getTestRunnerPath());
- wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, TestUnitLaunchShortcut.getDefaultWorkingDirectory(rubyFile.getProject()));
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, TestUnitLaunchShortcut.getDefaultWorkingDirectory(project));
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, RubyRuntime.getDefaultVMInstall().getName());
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, RubyRuntime.getDefaultVMInstall().getVMInstallType().getId());
wc.setAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, container);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|