|
From: <caw...@us...> - 2007-01-24 14:11:54
|
Revision: 1869
http://svn.sourceforge.net/rubyeclipse/?rev=1869&view=rev
Author: cawilliams
Date: 2007-01-24 06:11:53 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
trying to fix debugging - implementation Is tole from JDT forcibly terminated the debug Target and process too early. Modified to not do that (but the debugger is throwing erros for me - presumably from our previous incompatibility problems with particular ruby versions)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMRunner.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IRubyLaunchConfigurationConstants.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java 2007-01-23 21:46:17 UTC (rev 1868)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java 2007-01-24 14:11:53 UTC (rev 1869)
@@ -134,19 +134,18 @@
launch.addDebugTarget(debugTarget);
} catch (IOException e) {
abort(LaunchingMessages.StandardVMDebugger_Couldn__t_connect_to_VM_4, e, IRubyLaunchConfigurationConstants.ERR_CONNECTION_FAILED);
+ debugTarget.terminate();
} catch (RubyProcessingException e) {
abort(LaunchingMessages.StandardVMDebugger_Couldn__t_connect_to_VM_5, e, IRubyLaunchConfigurationConstants.ERR_CONNECTION_FAILED);
- } finally {
- // FIXME Should this always terminate, or just on exceptions?
debugTarget.terminate();
}
} else {
LaunchingPlugin.log(new Status(IStatus.ERROR, LaunchingPlugin.PLUGIN_ID, IStatus.ERROR, LaunchingMessages.RdtLaunchingPlugin_processTerminatedBecauseNoDebuggerConnection, null));
debugTarget.terminate();
}
- if (p != null) {
- p.destroy();
- }
+// if (p != null) {
+// p.destroy();
+// }
}
/**
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMRunner.java 2007-01-23 21:46:17 UTC (rev 1868)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMRunner.java 2007-01-24 14:11:53 UTC (rev 1869)
@@ -30,7 +30,7 @@
* Clients implementing VM runners should subclass this class.
* </p>
* @see IVMRunner
- * @since 2.0
+ * @since 0.9.0
*/
public abstract class AbstractVMRunner implements IVMRunner {
@@ -64,12 +64,12 @@
}
/**
- * @since 3.0
+ * @since 0.9.0
* @see DebugPlugin#exec(String[], File, String[])
*/
protected Process exec(String[] cmdLine, File workingDirectory, String[] envp) throws CoreException {
LaunchingPlugin.debug("Starting: " + getCmdLineAsString(cmdLine)) ;
- return DebugPlugin.exec(new String[] { "/bin/sleep" ,"120" }, workingDirectory, envp);
+ return DebugPlugin.exec(cmdLine, workingDirectory, envp);
}
/**
@@ -106,7 +106,7 @@
* @param attributes values for the attribute map
* @return the new process
* @throws CoreException problems occurred creating the process
- * @since 3.0
+ * @since 0.9.0
*/
protected IProcess newProcess(ILaunch launch, Process p, String label, Map attributes) throws CoreException {
IProcess process= DebugPlugin.newProcess(launch, p, label, attributes);
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IRubyLaunchConfigurationConstants.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IRubyLaunchConfigurationConstants.java 2007-01-23 21:46:17 UTC (rev 1868)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IRubyLaunchConfigurationConstants.java 2007-01-24 14:11:53 UTC (rev 1869)
@@ -78,13 +78,13 @@
* <code>ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP</code>. The value is a String,
* indicating the String to use to invoke the Ruby VM.
*/
- public static final String ATTR_RUBY_COMMAND = LaunchingPlugin.PLUGIN_ID + ".RUBY_COMMAND"; //$NON-NLS-1$
+ public static final String ATTR_RUBY_COMMAND = LaunchingPlugin.getUniqueIdentifier() + ".RUBY_COMMAND"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a name of
* a Ruby project associated with a Ruby launch configuration.
*/
- public static final String ATTR_PROJECT_NAME = LaunchingPlugin.PLUGIN_ID + ".PROJECT_NAME"; //$NON-NLS-1$
+ public static final String ATTR_PROJECT_NAME = LaunchingPlugin.getUniqueIdentifier() + ".PROJECT_NAME"; //$NON-NLS-1$
/**
@@ -109,7 +109,7 @@
*
* @deprecated use <code>ATTR_RUBY_CONTAINER_PATH</code>
*/
- public static final String ATTR_VM_INSTALL_NAME = LaunchingPlugin.PLUGIN_ID + ".VM_INSTALL_NAME"; //$NON-NLS-1$
+ public static final String ATTR_VM_INSTALL_NAME = LaunchingPlugin.getUniqueIdentifier() + ".VM_INSTALL_NAME"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is an identifier of
@@ -120,21 +120,21 @@
*
* @deprecated use <code>ATTR_RUBY_CONTAINER_PATH</code>
*/
- public static final String ATTR_VM_INSTALL_TYPE = LaunchingPlugin.PLUGIN_ID + ".VM_INSTALL_TYPE_ID"; //$NON-NLS-1$
+ public static final String ATTR_VM_INSTALL_TYPE = LaunchingPlugin.getUniqueIdentifier() + ".VM_INSTALL_TYPE_ID"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a string specifying
* program arguments for a Ruby launch configuration, as they should appear
* on the command line.
*/
- public static final String ATTR_PROGRAM_ARGUMENTS = LaunchingPlugin.PLUGIN_ID + ".PROGRAM_ARGUMENTS"; //$NON-NLS-1$
+ public static final String ATTR_PROGRAM_ARGUMENTS = LaunchingPlugin.getUniqueIdentifier() + ".PROGRAM_ARGUMENTS"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a string specifying
* VM arguments for a Ruby launch configuration, as they should appear
* on the command line.
*/
- public static final String ATTR_VM_ARGUMENTS = LaunchingPlugin.PLUGIN_ID + ".VM_ARGUMENTS"; //$NON-NLS-1$
+ public static final String ATTR_VM_ARGUMENTS = LaunchingPlugin.getUniqueIdentifier() + ".VM_ARGUMENTS"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a string specifying a
@@ -146,7 +146,7 @@
* launch configuration, the working directory is inherited from the current
* process.
*/
- public static final String ATTR_WORKING_DIRECTORY = LaunchingPlugin.PLUGIN_ID + ".WORKING_DIRECTORY"; //$NON-NLS-1$
+ public static final String ATTR_WORKING_DIRECTORY = LaunchingPlugin.getUniqueIdentifier() + ".WORKING_DIRECTORY"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a Map of attributes specific
@@ -155,13 +155,13 @@
* when launching a VM. The attributes in the map are implementation dependent
* and are limited to String keys and values.
*/
- public static final String ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP = LaunchingPlugin.PLUGIN_ID + "VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP"; //$NON-NLS-1$
+ public static final String ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP = LaunchingPlugin.getUniqueIdentifier() + "VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a fully qualified name
* of a file to launch.
*/
- public static final String ATTR_FILE_NAME = LaunchingPlugin.PLUGIN_ID + ".FILE_NAME"; //$NON-NLS-1$
+ public static final String ATTR_FILE_NAME = LaunchingPlugin.getUniqueIdentifier() + ".FILE_NAME"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is an identifier of a
@@ -169,7 +169,7 @@
* for a launch configuration. When unspecified, the default loadpath
* provider is used - <code>StandardLoadpathProvider</code>.
*/
- public static final String ATTR_LOADPATH_PROVIDER = LaunchingPlugin.PLUGIN_ID + ".LOADPATH_PROVIDER"; //$NON-NLS-1$
+ public static final String ATTR_LOADPATH_PROVIDER = LaunchingPlugin.getUniqueIdentifier() + ".LOADPATH_PROVIDER"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a boolean specifying
@@ -179,7 +179,7 @@
* unspecified, a loadpath is computed by the loadpath provider associated
* with a launch configuration.
*/
- public static final String ATTR_DEFAULT_LOADPATH = LaunchingPlugin.PLUGIN_ID + ".DEFAULT_LOADPATH"; //$NON-NLS-1$
+ public static final String ATTR_DEFAULT_LOADPATH = LaunchingPlugin.getUniqueIdentifier() + ".DEFAULT_LOADPATH"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The attribute value is an ordered list of strings
@@ -187,6 +187,6 @@
* loadpath is generated by the loadpath provider associated with a launch
* configuration (via the <code>ATTR_LOADPATH_PROVIDER</code> attribute).
*/
- public static final String ATTR_LOADPATH = LaunchingPlugin.PLUGIN_ID + ".LOADPATH"; //$NON-NLS-1$
+ public static final String ATTR_LOADPATH = LaunchingPlugin.getUniqueIdentifier() + ".LOADPATH"; //$NON-NLS-1$
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|