mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
Reversing previous changes. The existing "verifyProgramPath" method can be used.
This commit is contained in:
parent
cb1be70bed
commit
67a5ca4aef
2 changed files with 5 additions and 35 deletions
|
@ -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
|
2006-03-15 Mikhail Khodjaiants
|
||||||
The new "getExecutable" method is added to replace deprecated "getProgramFile".
|
The new "getExecutable" method is added to replace deprecated "getProgramFile".
|
||||||
* AbstractCLaunchDelegate.java
|
* AbstractCLaunchDelegate.java
|
||||||
|
|
|
@ -327,7 +327,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
* @param config
|
* @param config
|
||||||
* @return
|
* @return
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
* @deprecated Use <code>getExecutable</code> instead.
|
* @deprecated Use <code>verifyProgramFile</code> instead.
|
||||||
*/
|
*/
|
||||||
protected IFile getProgramFile(ILaunchConfiguration config) throws CoreException {
|
protected IFile getProgramFile(ILaunchConfiguration config) throws CoreException {
|
||||||
ICProject cproject = verifyCProject(config);
|
ICProject cproject = verifyCProject(config);
|
||||||
|
@ -349,40 +349,6 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
return programPath;
|
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 {
|
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
|
||||||
String name = getProjectName(config);
|
String name = getProjectName(config);
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue