mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection tool window: fix - tree forget some of nodes when grouped by packages IDEA-151314
This commit is contained in:
+6
-6
@@ -20,12 +20,10 @@
|
||||
*/
|
||||
package com.intellij.codeInspection.ex;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.intellij.codeInspection.CommonProblemDescriptor;
|
||||
import com.intellij.codeInspection.QuickFix;
|
||||
import com.intellij.codeInspection.reference.RefEntity;
|
||||
import com.intellij.codeInspection.ui.*;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleManager;
|
||||
@@ -37,8 +35,6 @@ import com.intellij.util.ui.tree.TreeUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.tree.DefaultTreeModel;
|
||||
import javax.swing.tree.MutableTreeNode;
|
||||
import javax.swing.tree.TreeNode;
|
||||
import javax.swing.tree.TreePath;
|
||||
import java.util.*;
|
||||
@@ -210,8 +206,12 @@ public abstract class InspectionRVContentProvider {
|
||||
for (UserObjectContainer<T> container : packageDescriptors.get(pNode)) {
|
||||
appendDescriptor(context, toolWrapper, container, pNode, canPackageRepeat);
|
||||
}
|
||||
for (int i = 0; i < pNode.getChildCount(); i++) {
|
||||
final TreeNode childNode = pNode.getChildAt(i);
|
||||
final int count = pNode.getChildCount();
|
||||
final ArrayList<TreeNode> childNodes = new ArrayList<>(count);
|
||||
for (int i = 0; i < count; i++) {
|
||||
childNodes.add(pNode.getChildAt(i));
|
||||
}
|
||||
for (TreeNode childNode: childNodes) {
|
||||
if (childNode instanceof ProblemDescriptionNode) {
|
||||
createdNodesConsumer.accept(pNode);
|
||||
break;
|
||||
|
||||
+14
-6
@@ -112,9 +112,13 @@ public class InspectionRVContentProviderImpl extends InspectionRVContentProvider
|
||||
}
|
||||
entities.addAll(moduleProblems);
|
||||
}
|
||||
buildTree(context, contents, false, toolWrapper, computeContainer, showStructure, node -> {
|
||||
merge(node, toolNode, true);
|
||||
});
|
||||
buildTree(context,
|
||||
contents,
|
||||
false,
|
||||
toolWrapper,
|
||||
computeContainer,
|
||||
showStructure,
|
||||
node -> merge(node, toolNode, true));
|
||||
|
||||
if (presentation.isOldProblemsIncluded()) {
|
||||
final Map<RefEntity, CommonProblemDescriptor[]> oldProblems = presentation.getOldProblemElements();
|
||||
@@ -125,9 +129,13 @@ public class InspectionRVContentProviderImpl extends InspectionRVContentProvider
|
||||
}
|
||||
};
|
||||
|
||||
buildTree(context, presentation.getOldContent(), true, toolWrapper, computeContainer, showStructure, node -> {
|
||||
merge(node, toolNode, true);
|
||||
});
|
||||
buildTree(context,
|
||||
presentation.getOldContent(),
|
||||
true,
|
||||
toolWrapper,
|
||||
computeContainer,
|
||||
showStructure,
|
||||
node -> merge(node, toolNode, true));
|
||||
}
|
||||
merge(toolNode, parentNode, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user