|
From: <caw...@us...> - 2007-03-02 14:58:43
|
Revision: 2073
http://svn.sourceforge.net/rubyeclipse/?rev=2073&view=rev
Author: cawilliams
Date: 2007-03-02 06:58:34 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
oopsie - try to fix broken launching that I caused when I tried to merge the two launching constant classes. SELECTED_INTERPRETER maps to VM_INSTALL_NAME now, rather than RUBY_CONTAINER (which I'm not sure is working correctly if we use it).
Also fixed the way we display the loadpaths in the environment tab of the run launch config stuff
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -4,6 +4,7 @@
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.swt.graphics.Image;
+import org.rubypeople.rdt.core.ILoadpathEntry;
import org.rubypeople.rdt.internal.core.LoadpathEntry;
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin;
@@ -20,20 +21,10 @@
* @see ILabelProvider#getText(Object)
*/
public String getText(Object element) {
- if (element != null && element.getClass() == LoadpathEntry.class) {
- IProject project = ((LoadpathEntry) element).getProject();
- // TODO: quick fix
- if (project == null) {
- return "Project is null" ;
- }
- if (project.isAccessible()) {
- return project.getLocation().toOSString() ;
- }
- else {
- return project.getName() + " (not accessible)" ;
- }
+ if (element != null && element instanceof ILoadpathEntry) {
+ ILoadpathEntry entry = (ILoadpathEntry) element;
+ return entry.getPath().toOSString();
}
-
RdtDebugUiPlugin.log(new RuntimeException("Unable to render load path."));
return null;
}
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -27,6 +27,7 @@
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
import org.rubypeople.rdt.launching.RubyRuntime;
public class RubyApplicationShortcut implements ILaunchShortcut {
@@ -130,8 +131,8 @@
wc.setAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, rubyFile.getProject().getName());
wc.setAttribute(RubyLaunchConfigurationAttribute.FILE_NAME, rubyFile.getProjectRelativePath().toString());
wc.setAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, RubyApplicationShortcut.getDefaultWorkingDirectory(rubyFile.getProject()));
- wc.setAttribute(RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, RubyRuntime.getCompositeIdFromVM(RubyRuntime.getDefaultVMInstall()));
- // FIXME generate a composite id for the interpreter, not name!
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, RubyRuntime.getDefaultVMInstall().getName());
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, RubyRuntime.getDefaultVMInstall().getVMInstallType().getId());
wc.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.rubypeople.rdt.debug.ui.rubySourceLocator");
config = wc.doSave();
} catch (CoreException ce) {
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -38,6 +38,7 @@
import org.rubypeople.rdt.internal.debug.ui.rubyvms.RubyVMMessages;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
import org.rubypeople.rdt.internal.ui.RubyPluginImages;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
import org.rubypeople.rdt.launching.IVMInstall;
import org.rubypeople.rdt.launching.IVMInstallType;
import org.rubypeople.rdt.launching.RubyRuntime;
@@ -46,7 +47,7 @@
public class RubyEnvironmentTab extends AbstractLaunchConfigurationTab {
protected ListViewer loadPathListViewer;
- protected java.util.List installedInterpretersWorkingCopy;
+ protected List installedInterpretersWorkingCopy;
protected Combo interpreterCombo;
@@ -217,7 +218,7 @@
setUseLoadPathDefaults(useDefaultLoadPath);
if (useDefaultLoadPath) {
String projectName = configuration.getAttribute(
- RubyLaunchConfigurationAttribute.PROJECT_NAME, "");
+ IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
if (projectName.length() != 0) {
IRubyProject project = RubyModelManager
.getRubyModelManager().getRubyModel()
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -40,9 +40,9 @@
static final String PROJECT_NAME = IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME;
/**
- * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH</code>
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME</code>.
*/
- static final String SELECTED_INTERPRETER = IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH;
+ static final String SELECTED_INTERPRETER = IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME;
/**
* @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY</code>
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -1397,7 +1397,7 @@
/**
* Performs default resolution for a container entry.
- * Delegates to the Java model.
+ * Delegates to the Ruby model.
*/
private static IRuntimeLoadpathEntry[] computeDefaultContainerEntries(IRuntimeLoadpathEntry entry, IRubyProject project) throws CoreException {
if (project == null || entry == null) {
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-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -138,7 +138,8 @@
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, rubyFile.getProject().getName());
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME, TestUnitLaunchConfigurationDelegate.getTestRunnerPath());
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, TestUnitLaunchShortcut.getDefaultWorkingDirectory(rubyFile.getProject()));
- wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH, RubyRuntime.getCompositeIdFromVM(RubyRuntime.getDefaultVMInstall()));
+ 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);
wc.setAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, testName);
wc.setAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, "");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|