1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

If the existing executables project is closed, use a new one.

This commit is contained in:
Ken Ryall 2008-04-07 20:15:21 +00:00
parent 35dfb7a9a9
commit 97a10ee586

View file

@ -78,6 +78,12 @@ public class StandardExecutableImporter implements IExecutableImporter {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject newProjectHandle = workspace.getRoot().getProject(defaultProjectName);
int projectSuffix = 2;
while (newProjectHandle.exists()){
newProjectHandle = workspace.getRoot().getProject(defaultProjectName + projectSuffix);
projectSuffix++;
}
IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
description.setLocation(null);
IFileStore store;