1
0
Fork 0
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:
Alain Magloire 2002-11-22 01:58:17 +00:00
parent 209710a46b
commit 005c6ad956

View file

@ -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 {