mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
another stub update index fix:
- stubs doesn't get buffered status update notifications because they aren't built out of unsaved documents - also index read also made affected to buffered status
This commit is contained in:
@@ -1450,6 +1450,7 @@ public class FileBasedIndexImpl extends FileBasedIndex {
|
|||||||
|
|
||||||
// if we have uncommitted documents in unsaved documents, we may index old psi with new uncommitted doc,
|
// if we have uncommitted documents in unsaved documents, we may index old psi with new uncommitted doc,
|
||||||
// to properly reindex with new psi / new doc we don't mark index up to date in this case (IDEA-111448)
|
// to properly reindex with new psi / new doc we don't mark index up to date in this case (IDEA-111448)
|
||||||
|
myUpToDateIndices.add(indexId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1603,6 +1604,7 @@ public class FileBasedIndexImpl extends FileBasedIndex {
|
|||||||
for (ID<?, ?> indexId : myIndices.keySet()) {
|
for (ID<?, ?> indexId : myIndices.keySet()) {
|
||||||
final MapReduceIndex index = (MapReduceIndex)getIndex(indexId);
|
final MapReduceIndex index = (MapReduceIndex)getIndex(indexId);
|
||||||
assert index != null;
|
assert index != null;
|
||||||
|
if (myPsiDependentIndices.contains(indexId)) continue;
|
||||||
final IndexStorage indexStorage = index.getStorage();
|
final IndexStorage indexStorage = index.getStorage();
|
||||||
((MemoryIndexStorage)indexStorage).setBufferingEnabled(enabled);
|
((MemoryIndexStorage)indexStorage).setBufferingEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,9 +187,11 @@ public class MemoryIndexStorage<Key, Value> implements IndexStorage<Key, Value>
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public ValueContainer<Value> read(final Key key) throws StorageException {
|
public ValueContainer<Value> read(final Key key) throws StorageException {
|
||||||
final ValueContainer<Value> valueContainer = myMap.get(key);
|
if (myBufferingEnabled.get()) {
|
||||||
if (valueContainer != null) {
|
final ValueContainer<Value> valueContainer = myMap.get(key);
|
||||||
return valueContainer;
|
if (valueContainer != null) {
|
||||||
|
return valueContainer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return myBackendStorage.read(key);
|
return myBackendStorage.read(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user