mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection view: collect unpresent files in listener after processor execution
This commit is contained in:
+5
-2
@@ -139,8 +139,8 @@ class InspectionViewChangeAdapter extends PsiTreeChangeAdapter {
|
||||
filesToCheck = new THashSet<>(myFilesToProcess);
|
||||
myFilesToProcess.clear();
|
||||
}
|
||||
Set<VirtualFile> unPresentFiles = new THashSet<>(filesToCheck);
|
||||
if (!filesToCheck.isEmpty()) {
|
||||
Set<VirtualFile> unPresentFiles = new THashSet<>(filesToCheck);
|
||||
Processor<InspectionTreeNode> fileCheckProcessor = (node) -> {
|
||||
if (myView.isDisposed()) {
|
||||
return false;
|
||||
@@ -166,13 +166,16 @@ class InspectionViewChangeAdapter extends PsiTreeChangeAdapter {
|
||||
return true;
|
||||
};
|
||||
nodeProcessor = CompositeProcessor.combine(fileCheckProcessor, nodeProcessor);
|
||||
myUnPresentEditedFiles.addAll(unPresentFiles);
|
||||
}
|
||||
|
||||
synchronized (myView.getTreeStructureUpdateLock()) {
|
||||
processNodesIfNeed(myView.getTree().getRoot(), Objects.requireNonNull(nodeProcessor));
|
||||
}
|
||||
|
||||
if (!unPresentFiles.isEmpty()) {
|
||||
myUnPresentEditedFiles.addAll(unPresentFiles);
|
||||
}
|
||||
|
||||
if (needUpdateUI[0] && !myAlarm.isDisposed()) {
|
||||
myAlarm.cancelAllRequests();
|
||||
myAlarm.addRequest(() -> myView.resetTree(), 100, ModalityState.NON_MODAL);
|
||||
|
||||
Reference in New Issue
Block a user