mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-02 22:55:26 +02:00
Bug 243487 The reset(IDMContext) method clears descendants of the specified context but not the context itself.
Also, a return was missing.
This commit is contained in:
parent
7c7d4c5918
commit
5f3384b6fe
1 changed files with 3 additions and 2 deletions
|
@ -537,10 +537,11 @@ public class CommandCache implements ICommandListener
|
|||
public void reset(IDMContext dmc) {
|
||||
if (dmc == null) {
|
||||
fCachedContexts.clear();
|
||||
return;
|
||||
}
|
||||
for (Iterator<IDMContext> itr = fCachedContexts.keySet().iterator(); itr.hasNext();) {
|
||||
for (Iterator<IDMContext> itr = fCachedContexts.keySet().iterator(); itr.hasNext();) {
|
||||
IDMContext keyDmc = itr.next();
|
||||
if (keyDmc != null && DMContexts.isAncestorOf(keyDmc, dmc)) {
|
||||
if (keyDmc != null && (dmc.equals(keyDmc) || DMContexts.isAncestorOf(keyDmc, dmc))) {
|
||||
itr.remove();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue