Skip to content

Commit b504a86

Browse files
Fix AST-136035: Preserve tree expansion state when severity filter changes
- Capture expanded elements before clearing the model so the snapshot is accurate when restoring after refresh - Pass expand=true for FILTER_CHANGED (keep GET_RESULTS at false) so previously expanded group nodes are restored after filtering instead of collapsing the entire tree Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent d0e4723 commit b504a86

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

checkmarx-ast-eclipse-plugin/src/com/checkmarx/eclipse/views/CheckmarxView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2474,6 +2474,8 @@ private Image findSeverityImage(DisplayModel model) {
24742474
private void listener(PluginListenerDefinition definition) {
24752475
switch (definition.getListenerType()) {
24762476
case FILTER_CHANGED:
2477+
updateResultsTree(definition.getResutls(), true);
2478+
break;
24772479
case GET_RESULTS:
24782480
updateResultsTree(definition.getResutls(), false);
24792481
break;
@@ -2496,9 +2498,9 @@ private void updateResultsTree(List<DisplayModel> results, boolean expand) {
24962498
resultViewComposite.setVisible(false);
24972499
attackVectorCompositePanel.setVisible(false);
24982500
}
2501+
Object[] expanded = resultsTree.getExpandedElements();
24992502
rootModel.children.clear();
25002503
rootModel.children.addAll(results);
2501-
Object[] expanded = resultsTree.getExpandedElements();
25022504
resultsTree.refresh();
25032505
if (expand) {
25042506
Set<String> expandedDMNames = new HashSet<>();

0 commit comments

Comments
 (0)