From 67a5ca4aefdac4057253d0aa40f0f48813927365 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Wed, 15 Mar 2006 19:05:09 +0000 Subject: [PATCH] Reversing previous changes. The existing "verifyProgramPath" method can be used. --- launch/org.eclipse.cdt.launch/ChangeLog | 4 +++ .../cdt/launch/AbstractCLaunchDelegate.java | 36 +------------------ 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog index 83071a6f8ef..59d39fd9524 100644 --- a/launch/org.eclipse.cdt.launch/ChangeLog +++ b/launch/org.eclipse.cdt.launch/ChangeLog @@ -1,3 +1,7 @@ +2006-03-15 Mikhail Khodjaiants + Reversing previous changes. The existing "verifyProgramPath" method can be used. + * AbstractCLaunchDelegate.java + 2006-03-15 Mikhail Khodjaiants The new "getExecutable" method is added to replace deprecated "getProgramFile". * AbstractCLaunchDelegate.java diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java index 17d644e4fd7..3d94b3d5817 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java @@ -327,7 +327,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat * @param config * @return * @throws CoreException - * @deprecated Use getExecutable instead. + * @deprecated Use verifyProgramFile instead. */ protected IFile getProgramFile(ILaunchConfiguration config) throws CoreException { ICProject cproject = verifyCProject(config); @@ -349,40 +349,6 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat return programPath; } - /** - * Returns the file based on the path specified in the Main tab of the launch - * configguration dialog. If the original path is relative, it is assumed to - * be relative to the project location. - * - * @since 3.1 - */ - protected File getExecutable(ILaunchConfiguration config) throws CoreException { - ICProject cproject = verifyCProject(config); - String fileName = getProgramName(config); - if (fileName == null) { - abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_not_specified"), null, //$NON-NLS-1$ - ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM); - } - IPath path = new Path(fileName); - File result = null; - if (!path.isAbsolute()) { - IFile programPath = ((IProject)cproject.getResource()).getFile(fileName); - if (programPath == null || !programPath.exists() || !programPath.getLocation().toFile().exists()) { - abort( - LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_does_not_exist"), //$NON-NLS-1$ - new FileNotFoundException( - LaunchMessages.getFormattedString( - "AbstractCLaunchDelegate.PROGRAM_PATH_not_found", programPath.getLocation().toOSString())), //$NON-NLS-1$ - ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_EXIST); - } - result = programPath.getLocation().toFile(); - } - else { - result = path.toFile(); - } - return result; - } - protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException { String name = getProjectName(config); if (name == null) {