mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 11:15:38 +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) {
|
if (name == null) {
|
||||||
abort("C project not specified", null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
|
abort("C project not specified", null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
|
||||||
}
|
}
|
||||||
ICProject project = getCProject(config);
|
ICProject cproject = getCProject(config);
|
||||||
if (project == null) {
|
if (cproject == null) {
|
||||||
abort("Project does not exist or is not a C/C++ project", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
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 {
|
protected IPath verifyProgramFile(ILaunchConfiguration config) throws CoreException {
|
||||||
|
|
Loading…
Add table
Reference in a new issue