mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Check the project exists() or isOpen().
This commit is contained in:
parent
209710a46b
commit
005c6ad956
1 changed files with 10 additions and 4 deletions
|
@ -197,11 +197,17 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
|
|||
if (name == null) {
|
||||
abort("C project not specified", null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
|
||||
}
|
||||
ICProject project = getCProject(config);
|
||||
if (project == null) {
|
||||
abort("Project does not exist or is not a C/C++ project", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
||||
ICProject cproject = getCProject(config);
|
||||
if (cproject == null) {
|
||||
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
|
||||
if (!project.exists()) {
|
||||
abort("Project does not exist", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
||||
} else if (!project.isOpen()) {
|
||||
abort("Project is closed", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
||||
}
|
||||
abort("Project is not a C/C++ project", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
||||
}
|
||||
return project;
|
||||
return cproject;
|
||||
}
|
||||
|
||||
protected IPath verifyProgramFile(ILaunchConfiguration config) throws CoreException {
|
||||
|
|
Loading…
Add table
Reference in a new issue