mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
nolonger throws bogus exception when .cdtproject id does not match
This commit is contained in:
parent
3f5fd52006
commit
4a12e51cb9
2 changed files with 9 additions and 15 deletions
|
@ -266,14 +266,6 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
|
||||||
if (cproject == null) {
|
if (cproject == null) {
|
||||||
cproject = create(file.getProject());
|
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;
|
boolean checkIfBinary = false;
|
||||||
ICElement celement = null;
|
ICElement celement = null;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -101,15 +101,17 @@ public class CDescriptor implements ICDescriptor {
|
||||||
if (descriptionPath.toFile().exists()) {
|
if (descriptionPath.toFile().exists()) {
|
||||||
IStatus status;
|
IStatus status;
|
||||||
String ownerID = readCDTProjectFile(descriptionPath);
|
String ownerID = readCDTProjectFile(descriptionPath);
|
||||||
|
if (!ownerID.equals("")) { //$NON-NLS-1$
|
||||||
if (ownerID.equals(id)) {
|
if (ownerID.equals(id)) {
|
||||||
status = new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS,
|
status = new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS,
|
||||||
CCorePlugin.getResourceString("CDescriptor.exception.projectAlreadyExists"), (Throwable)null); //$NON-NLS-1$
|
CCorePlugin.getResourceString("CDescriptor.exception.projectAlreadyExists"), (Throwable)null); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_MISMATCH,
|
status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_MISMATCH,
|
||||||
CCorePlugin.getResourceString("CDescriptor.exception.unmatchedOwnerId"), (Throwable)null); //$NON-NLS-1$
|
CCorePlugin.getResourceString("CDescriptor.exception.unmatchedOwnerId") + "<requested:" +id +"/ In file:" +ownerID+">", (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 = new COwner(manager.getOwnerConfiguration(id));
|
||||||
fOwner.configure(project, this);
|
fOwner.configure(project, this);
|
||||||
isInitializing = false;
|
isInitializing = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue