|
From: <caw...@us...> - 2007-06-20 16:45:44
|
Revision: 2643
http://svn.sourceforge.net/rubyeclipse/?rev=2643&view=rev
Author: cawilliams
Date: 2007-06-20 09:45:43 -0700 (Wed, 20 Jun 2007)
Log Message:
-----------
remove more deprecated code
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.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/RubyArgumentsTab.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEntryPointTab.java
trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java
trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyArgumentsTab.java
trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyEntryPointTab.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java 2007-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -16,6 +16,7 @@
import org.rubypeople.rdt.internal.debug.core.model.RubyStackFrame;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
import org.rubypeople.rdt.internal.ui.rubyeditor.ExternalRubyFileEditorInput;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
import org.rubypeople.rdt.ui.IRubyConstants;
/**
@@ -53,7 +54,7 @@
* @see org.eclipse.debug.core.model.IPersistableSourceLocator#initializeDefaults(ILaunchConfiguration)
*/
public void initializeDefaults(ILaunchConfiguration configuration) throws CoreException {
- this.absoluteWorkingDirectory = configuration.getAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, ""); //$NON-NLS-1$
+ this.absoluteWorkingDirectory = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
}
/**
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-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -130,7 +130,7 @@
ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(rubyFile.getName()));
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, rubyFile.getProject().getName());
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME, rubyFile.getProjectRelativePath().toString());
- wc.setAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, RubyApplicationShortcut.getDefaultWorkingDirectory(rubyFile.getProject()));
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, RubyApplicationShortcut.getDefaultWorkingDirectory(rubyFile.getProject()));
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");
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyArgumentsTab.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyArgumentsTab.java 2007-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyArgumentsTab.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -92,7 +92,7 @@
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(RubyLaunchConfigurationAttribute.USE_DEFAULT_WORKING_DIRECTORY, true);
- configuration.setAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, (String)null);
+ configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String)null);
// set hidden attribute
configuration.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.rubypeople.rdt.debug.ui.rubySourceLocator") ;
}
@@ -101,7 +101,7 @@
String workingDirectory = "", interpreterArgs = "", programArgs = "";
boolean useDefaultWorkDir = true;
try {
- workingDirectory = configuration.getAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, "");
+ workingDirectory = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "");
interpreterArgs = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "");
programArgs = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "");
useDefaultWorkDir = configuration.getAttribute(RubyLaunchConfigurationAttribute.USE_DEFAULT_WORKING_DIRECTORY, true);
@@ -116,7 +116,7 @@
}
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- configuration.setAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, workingDirectorySelector.getValidatedSelectionText());
+ configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, workingDirectorySelector.getValidatedSelectionText());
configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, interpreterArgsText.getText());
configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, programArgsText.getText());
configuration.setAttribute(RubyLaunchConfigurationAttribute.USE_DEFAULT_WORKING_DIRECTORY, useDefaultWorkingDirectoryButton.getSelection());
@@ -139,7 +139,7 @@
public boolean isValid(ILaunchConfiguration launchConfig) {
try {
- String workingDirectory = launchConfig.getAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, "");
+ String workingDirectory = launchConfig.getAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "");
if (!useDefaultWorkingDirectoryButton() && workingDirectory.length() == 0) {
setErrorMessage(RdtDebugUiMessages.LaunchConfigurationTab_RubyArguments_working_dir_error_message);
return false;
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEntryPointTab.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEntryPointTab.java 2007-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEntryPointTab.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -70,13 +70,13 @@
if (project == null || !RubyCore.isRubyProject(project)) {
return ;
}
- configuration.setAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, project.getName());
+ configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());
configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME, selectedResource.getProjectRelativePath().toString()) ;
}
public void initializeFrom(ILaunchConfiguration configuration) {
try {
- originalProjectName = configuration.getAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, "");
+ originalProjectName = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
originalFileName = configuration.getAttribute(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME, "");
} catch (CoreException e) {
log(e);
@@ -89,7 +89,7 @@
}
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- configuration.setAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, projectSelector.getSelectionText());
+ configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectSelector.getSelectionText());
IFile file = fileSelector.getSelection();
configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME, file == null ? "" : file.getProjectRelativePath().toString());
}
@@ -111,7 +111,7 @@
public boolean isValid(ILaunchConfiguration launchConfig) {
try {
- String projectName = launchConfig.getAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, "");
+ String projectName = launchConfig.getAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
if (projectName.length() == 0) {
setErrorMessage(RdtDebugUiMessages.LaunchConfigurationTab_RubyEntryPoint_invalidProjectSelectionMessage);
return false;
Modified: trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java 2007-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -50,9 +50,9 @@
try {
ILaunchConfigurationType configType = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(SHAM_LAUNCH_CONFIG_TYPE);
ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, pFile.getName());
- wc.setAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, pFile.getProject().getName());
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, pFile.getProject().getName());
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME, pFile.getProjectRelativePath().toString());
- wc.setAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, "");
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "");
wc.setAttribute(RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, RubyRuntime.getCompositeIdFromVM(RubyRuntime.getDefaultVMInstall()));
wc.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.rubypeople.rdt.debug.ui.rubySourceLocator");
config = wc.doSave();
Modified: trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyArgumentsTab.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyArgumentsTab.java 2007-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyArgumentsTab.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -7,6 +7,7 @@
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiMessages;
import org.rubypeople.rdt.internal.debug.ui.launcher.RubyArgumentsTab;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
public class TC_RubyArgumentsTab extends TestCase {
@@ -24,7 +25,7 @@
errorMessage = RdtDebugUiMessages.LaunchConfigurationTab_RubyArguments_working_dir_error_message;
assertEquals("The tab should set the error message for invalid working directory.", errorMessage, tab.getErrorMessage());
- configuration.setAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, "aValidDirectory");
+ configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "aValidDirectory");
assertTrue("The tab is valid when the configuration has a working directory.", tab.isValid(configuration));
assertNull("The tab should set the error message to null when there is a working directory.", tab.getErrorMessage());
}
Modified: trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyEntryPointTab.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyEntryPointTab.java 2007-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyEntryPointTab.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -25,7 +25,7 @@
errorMessage = RdtDebugUiMessages.LaunchConfigurationTab_RubyEntryPoint_invalidProjectSelectionMessage;
assertEquals("The tab should set the error message for no project.", errorMessage, tab.getErrorMessage());
- configuration.setAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, "myProjectName");
+ configuration.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, "myProjectName");
assertTrue("The tab is not valid when the configuration has only a projectname.", !tab.isValid(configuration));
errorMessage = RdtDebugUiMessages.LaunchConfigurationTab_RubyEntryPoint_invalidFileSelectionMessage;
assertEquals("The tab should set the error message for no file.", errorMessage, tab.getErrorMessage());
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-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -10,21 +10,11 @@
public interface RubyLaunchConfigurationAttribute {
/**
- * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME</code>
- */
- static final String PROJECT_NAME = IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME;
-
- /**
* @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME</code>.
*/
static final String SELECTED_INTERPRETER = IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME;
-
+
/**
- * @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;
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-06-20 16:42:22 UTC (rev 2642)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-06-20 16:45:43 UTC (rev 2643)
@@ -168,11 +168,11 @@
}
public String getAttribute(String attributeName, String defaultValue) throws CoreException {
- if (attributeName.equals(RubyLaunchConfigurationAttribute.PROJECT_NAME)) {
+ if (attributeName.equals(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME)) {
return PROJECT_NAME;
} else if (attributeName.equals(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME)) {
return RUBY_LIB_DIR + File.separator + RUBY_FILE_NAME;
- } else if (attributeName.equals(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY)) {
+ } else if (attributeName.equals(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY)) {
return '/' + PROJECT_NAME;
} else if (attributeName.equals(IRubyLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS)) {
return PROGRAM_ARGUMENTS;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|