mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection view: clear single descriptor in RefElementNode if second problem was added
This commit is contained in:
+1
-3
@@ -131,9 +131,7 @@ public class InspectionRVContentProviderImpl extends InspectionRVContentProvider
|
||||
assert problem != null;
|
||||
elemNode
|
||||
.insertByOrder(ReadAction.compute(() -> new ProblemDescriptionNode(refElement, problem, toolWrapper, presentation)), true);
|
||||
if (problems.length == 1) {
|
||||
elemNode.setProblem(problems[0]);
|
||||
}
|
||||
elemNode.setProblem(elemNode.getChildCount() == 1 ? problems[0] : null);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -102,7 +102,7 @@ public class RefElementNode extends SuppressableInspectionTreeNode {
|
||||
return super.insertByOrder(child, allowDuplication);
|
||||
}
|
||||
|
||||
public void setProblem(@NotNull CommonProblemDescriptor descriptor) {
|
||||
public void setProblem(CommonProblemDescriptor descriptor) {
|
||||
mySingleDescriptor = descriptor;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user