1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

fixed error on project creation

This commit is contained in:
David Inglis 2004-03-09 21:51:19 +00:00
parent f490ac49d2
commit 8820a6d0d7
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2004-03-09 David Inglis
Don't error in CDescriptorManager.configure() when project is created twice with the same owner id.
* src/org/eclipse/cdt/internal/core/CDescriptorManager.java
2004-03-09 Alain Magloire
Patch from Chris Wiebe

View file

@ -105,9 +105,13 @@ public class CDescriptorManager implements IResourceChangeListener {
if ( fDescriptorMap == null ) {
fDescriptorMap = new HashMap();
}
if ( fDescriptorMap.get(project) != null ) {
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS, CCorePlugin.getResourceString("CDescriptorManager.exception.alreadyConfigured"), (Throwable)null); //$NON-NLS-1$
throw new CoreException(status);
cproject = (CDescriptor) fDescriptorMap.get(project);
if ( cproject != null ) {
if ( !cproject.getProjectOwner().getID().equals(id) ) {
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS, CCorePlugin.getResourceString("CDescriptorManager.exception.alreadyConfigured"), (Throwable)null); //$NON-NLS-1$
throw new CoreException(status);
}
return;
}
try {
cproject = new CDescriptor(project, id);