this.changes.put(importContainer, delta);
}
}
private void addChange(IImportDeclaration importDecl, IJavaElementDelta newDelta) {
SimpleDelta existingDelta = (SimpleDelta)this.changes.get(importDecl);
int newKind = newDelta.getKind();
if (existingDelta != null) {
switch (newKind) {
case IJavaElementDelta.ADDED:
if (existingDelta.getKind() == IJavaElementDelta.REMOVED) {
// REMOVED then ADDED
this.changes.remove(importDecl);
}
break;
case IJavaElementDelta.REMOVED:
if (existingDelta.getKind() == IJavaElementDelta.ADDED) {
// ADDED then REMOVED
this.changes.remove(importDecl);
}
break;
// CHANGED cannot happen for import declaration
}
} else {
SimpleDelta delta = new SimpleDelta();
switch (newKind) {
case IJavaElementDelta.ADDED:
delta.added();
break;
case IJavaElementDelta.REMOVED:
delta.removed();
break;
}
this.changes.put(importDecl, delta);
}
}