1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

2004-06-28 Alain Magloire

Fix for PR 68820.
	* model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java
	* src/org/eclipse/cdt/core/resources/FileStorage.java
This commit is contained in:
Alain Magloire 2004-06-28 21:09:07 +00:00
parent 6b222b30ad
commit b98a43f436
3 changed files with 18 additions and 9 deletions

View file

@ -1,3 +1,9 @@
2004-06-28 Alain Magloire
Fix for PR 68820.
* model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java
* src/org/eclipse/cdt/core/resources/FileStorage.java
2004-06-28 Hoda Amer 2004-06-28 Hoda Amer
Patch for Keith Campbell, a small fix in CConventions. Patch for Keith Campbell, a small fix in CConventions.

View file

@ -375,9 +375,8 @@ public class DeltaProcessor {
ICElementDelta[] result = new ICElementDelta[index]; ICElementDelta[] result = new ICElementDelta[index];
System.arraycopy(realDeltas, 0, result, 0, index); System.arraycopy(realDeltas, 0, result, 0, index);
return result; return result;
} else {
return NO_DELTA;
} }
return NO_DELTA;
} }
/** /**
@ -430,9 +429,14 @@ public class DeltaProcessor {
IResource resource = delta.getResource(); IResource resource = delta.getResource();
ICElement current = createElement(resource); ICElement current = createElement(resource);
updateChildren = updateCurrentDeltaAndIndex(delta); updateChildren = updateCurrentDeltaAndIndex(delta);
if (current == null || current instanceof ISourceRoot || if (current == null || current instanceof ISourceRoot) {
(current instanceof ICProject && !((ICProject)current).getProject().isOpen())) {
nonCResourcesChanged(parent, delta); nonCResourcesChanged(parent, delta);
} else if (current instanceof ICProject) {
ICProject cprj = (ICProject)current;
CModel cModel = CModelManager.getDefault().getCModel();
if (!cprj.getProject().isOpen() || cModel.findCProject(cprj.getProject()) == null) {
nonCResourcesChanged(parent, delta);
}
} else { } else {
parent = current; parent = current;
} }

View file

@ -40,9 +40,8 @@ public class FileStorage extends PlatformObject implements IStorage {
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID,
IStatus.ERROR, e.toString(), e)); IStatus.ERROR, e.toString(), e));
} }
} else {
return in;
} }
return in;
} }
/** /**
@ -86,10 +85,10 @@ public class FileStorage extends PlatformObject implements IStorage {
if (this == obj) if (this == obj)
return true; return true;
if (obj instanceof IStorage) { if (obj instanceof IStorage) {
IPath path= getFullPath(); IPath p= getFullPath();
IPath objPath= ((IStorage)obj).getFullPath(); IPath objPath= ((IStorage)obj).getFullPath();
if (path != null && objPath != null) if (p != null && objPath != null)
return path.equals(objPath); return p.equals(objPath);
} }
return super.equals(obj); return super.equals(obj);
} }