diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java index 98cfc7bcbbf..86b58a912f1 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java @@ -266,14 +266,6 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe if (cproject == null) { cproject = create(file.getProject()); } - ///////////////////////////////////////////////// - // FIXME-alain: Quick hack 'til we fix the CDescriptor - // This should/must be remove - // ".cdtproject" is a special file for CProjects. - ///////////////////////////////////////////////// - if (file.getName().equals(".cdtproject")) { // $NON-NLS-1$ - return null; - } boolean checkIfBinary = false; ICElement celement = null; try { diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java index f8da5c018ae..7a6c48dfb31 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java @@ -101,14 +101,16 @@ public class CDescriptor implements ICDescriptor { if (descriptionPath.toFile().exists()) { IStatus status; String ownerID = readCDTProjectFile(descriptionPath); - if (ownerID.equals(id)) { - status = new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS, - CCorePlugin.getResourceString("CDescriptor.exception.projectAlreadyExists"), (Throwable)null); //$NON-NLS-1$ - } else { - status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_MISMATCH, - CCorePlugin.getResourceString("CDescriptor.exception.unmatchedOwnerId"), (Throwable)null); //$NON-NLS-1$ + if (!ownerID.equals("")) { //$NON-NLS-1$ + if (ownerID.equals(id)) { + status = new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS, + CCorePlugin.getResourceString("CDescriptor.exception.projectAlreadyExists"), (Throwable)null); //$NON-NLS-1$ + } else { + status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_MISMATCH, + CCorePlugin.getResourceString("CDescriptor.exception.unmatchedOwnerId") + "", (Throwable)null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + } + throw new CoreException(status); } - throw new CoreException(status); } fOwner = new COwner(manager.getOwnerConfiguration(id)); fOwner.configure(project, this);