|
From: <caw...@us...> - 2007-02-26 20:16:33
|
Revision: 2043
http://svn.sourceforge.net/rubyeclipse/?rev=2043&view=rev
Author: cawilliams
Date: 2007-02-26 12:16:29 -0800 (Mon, 26 Feb 2007)
Log Message:
-----------
start merging our two interfaces with constants for launching. I've modified the new IRubylaunchConfigurationConstants to use the old strings when possible (the only exception is RUBY_CONTAINER_PATH which would break with old values anyways).
Marked all the old constants deprecated that had new equivalents.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IRubyLaunchConfigurationConstants.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
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-02-26 18:56:47 UTC (rev 2042)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java 2007-02-26 20:16:29 UTC (rev 2043)
@@ -1,18 +1,59 @@
package org.rubypeople.rdt.internal.launching;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
+/**
+ * @deprecated Please use the externally visible IRubyLaunchConfigurationConstants
+ *
+ */
public interface RubyLaunchConfigurationAttribute {
- static final String RUBY_LAUNCH_CONFIGURATION_TYPE = "org.rubypeople.rdt.launching.LaunchConfigurationTypeRubyApplication";
+
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ID_RUBY_APPLICATION</code>
+ */
+ static final String RUBY_LAUNCH_CONFIGURATION_TYPE = IRubyLaunchConfigurationConstants.ID_RUBY_APPLICATION;
- static final String CUSTOM_LOAD_PATH = LaunchingPlugin.PLUGIN_ID + ".CUSTOM_LOAD_PATH";
- static final String FILE_NAME = LaunchingPlugin.PLUGIN_ID + ".FILE_NAME";
- static final String INTERPRETER_ARGUMENTS = LaunchingPlugin.PLUGIN_ID + ".INTERPRETER_ARGUMENTS";
- static final String MODULE_NAME = LaunchingPlugin.PLUGIN_ID + ".MODULE_NAME";
- static final String PROGRAM_ARGUMENTS = LaunchingPlugin.PLUGIN_ID + ".PROGRAM_ARGUMENTS";
- static final String PROJECT_NAME = LaunchingPlugin.PLUGIN_ID + ".PROJECT_NAME";
- static final String SELECTED_INTERPRETER = LaunchingPlugin.PLUGIN_ID + ".SELECTED_INTERPRETER";
- static final String WORKING_DIRECTORY = LaunchingPlugin.PLUGIN_ID + ".WORKING_DIRECTORY";
- static final String USE_DEFAULT_LOAD_PATH = LaunchingPlugin.PLUGIN_ID + ".USE_DEFAULT_LOAD_PATH";
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_LOADPATH</code>
+ */
+ static final String CUSTOM_LOAD_PATH = IRubyLaunchConfigurationConstants.ATTR_LOADPATH;
+
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_FILE_NAME</code>
+ */
+ static final String FILE_NAME = IRubyLaunchConfigurationConstants.ATTR_FILE_NAME;
+
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_VM_ARGUMENTS</code>
+ */
+ static final String INTERPRETER_ARGUMENTS = IRubyLaunchConfigurationConstants.ATTR_VM_ARGUMENTS;
+
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS</code>
+ */
+ static final String PROGRAM_ARGUMENTS = IRubyLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS;
+
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME</code>
+ */
+ static final String PROJECT_NAME = IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME;
+
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH</code>
+ */
+ static final String SELECTED_INTERPRETER = IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH;
+
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY</code>
+ */
+ static final String WORKING_DIRECTORY = IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY;
+
+ /**
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_DEFAULT_LOADPATH</code>
+ */
+ static final String USE_DEFAULT_LOAD_PATH = IRubyLaunchConfigurationConstants.ATTR_DEFAULT_LOADPATH;
+
+
static final String USE_DEFAULT_WORKING_DIRECTORY = LaunchingPlugin.PLUGIN_ID + ".USE_DEFAULT_WORKING_DIRECTORY";
}
\ No newline at end of file
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-02-26 18:56:47 UTC (rev 2042)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IRubyLaunchConfigurationConstants.java 2007-02-26 20:16:29 UTC (rev 2043)
@@ -5,6 +5,12 @@
public interface IRubyLaunchConfigurationConstants {
/**
+ * Identifier for the Local Ruby Application launch configuration type
+ * (value <code>"org.rubypeople.rdt.launching.LaunchConfigurationTypeRubyApplication"</code>).
+ */
+ public static final String ID_RUBY_APPLICATION = LaunchingPlugin.getUniqueIdentifier() + ".LaunchConfigurationTypeRubyApplication"; //$NON-NLS-1$
+
+ /**
* Status code indicating a launch configuration does not
* specify a file to launch.
*/
@@ -88,14 +94,14 @@
/**
- * Launch configuration attribute key. The value is a path identifying the JRE used
+ * Launch configuration attribute key. The value is a path identifying the RubyVM used
* when launching a local VM. The path is a loadpath container corresponding
* to the <code>RubyRuntime.RUBY_CONTAINER</code> loadpath container.
* <p>
- * When unspecified the default JRE for a launch configuration is used (which is the
- * JRE associated with the project being launched, or the workspace default JRE when
- * no project is associated with a configuration). The default JRE loadpath container
- * refers explicitly to the workspace default JRE.
+ * When unspecified the default RubyVM for a launch configuration is used (which is the
+ * RubyVM associated with the project being launched, or the workspace default RubyVM when
+ * no project is associated with a configuration). The default RubyVM loadpath container
+ * refers explicitly to the workspace default RubyVM.
* </p>
* @since 0.9.0
*/
@@ -134,7 +140,7 @@
* VM arguments for a Ruby launch configuration, as they should appear
* on the command line.
*/
- public static final String ATTR_VM_ARGUMENTS = LaunchingPlugin.getUniqueIdentifier() + ".VM_ARGUMENTS"; //$NON-NLS-1$
+ public static final String ATTR_VM_ARGUMENTS = LaunchingPlugin.getUniqueIdentifier() + ".INTERPRETER_ARGUMENTS"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a string specifying a
@@ -174,12 +180,12 @@
/**
* Launch configuration attribute key. The value is a boolean specifying
* whether a default loadpath should be used when launching a local
- * Java application. When <code>false</code>, a loadpath must be specified
- * via the <code>ATTR_CLASSPATH</code> attribute. When <code>true</code> or
+ * Ruby application. When <code>false</code>, a loadpath must be specified
+ * via the <code>ATTR_LOADPATH</code> attribute. When <code>true</code> or
* unspecified, a loadpath is computed by the loadpath provider associated
* with a launch configuration.
*/
- public static final String ATTR_DEFAULT_LOADPATH = LaunchingPlugin.getUniqueIdentifier() + ".DEFAULT_LOADPATH"; //$NON-NLS-1$
+ public static final String ATTR_DEFAULT_LOADPATH = LaunchingPlugin.getUniqueIdentifier() + ".USE_DEFAULT_LOAD_PATH"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The attribute value is an ordered list of strings
@@ -187,6 +193,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.getUniqueIdentifier() + ".LOADPATH"; //$NON-NLS-1$
+ public static final String ATTR_LOADPATH = LaunchingPlugin.getUniqueIdentifier() + ".CUSTOM_LOAD_PATH"; //$NON-NLS-1$
}
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-02-26 18:56:47 UTC (rev 2042)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-02-26 20:16:29 UTC (rev 2043)
@@ -1137,32 +1137,32 @@
* </ol>
* </p>
* @param configuration
- * @return loadpath container path identifying a JRE or <code>null</code>
+ * @return loadpath container path identifying a RubyVM or <code>null</code>
* @exception org.eclipse.core.runtime.CoreException if an exception occurs retrieving
* attributes from the specified launch configuration
* @since 0.9.0
*/
public static IRuntimeLoadpathEntry computeRubyVMEntry(ILaunchConfiguration configuration) throws CoreException {
- String jreAttr = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH, (String)null);
+ String rubyVmAttr = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH, (String)null);
IPath containerPath = null;
- if (jreAttr == null) {
+ if (rubyVmAttr == null) {
String type = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
if (type == null) {
- // default JRE for the launch configuration
+ // default RubyVM for the launch configuration
IRubyProject proj = getRubyProject(configuration);
if (proj == null) {
- containerPath = newDefaultJREContainerPath();
+ containerPath = newDefaultRubyVMContainerPath();
} else {
return computeRubyVMEntry(proj);
}
} else {
String name = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, (String)null);
if (name != null) {
- containerPath = newDefaultJREContainerPath().append(type).append(name);
+ containerPath = newDefaultRubyVMContainerPath().append(type).append(name);
}
}
} else {
- containerPath = Path.fromPortableString(jreAttr);
+ containerPath = Path.fromPortableString(rubyVmAttr);
}
if (containerPath != null) {
return newRuntimeContainerLoadpathEntry(containerPath, IRuntimeLoadpathEntry.STANDARD_CLASSES);
@@ -1226,7 +1226,7 @@
* @return loadpath container path
* @since 0.9.0
*/
- public static IPath newDefaultJREContainerPath() {
+ public static IPath newDefaultRubyVMContainerPath() {
return new Path(RUBY_CONTAINER);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|