Skip to content

Commit d0e4723

Browse files
Fix AST-136035: Clear right panels only when displayed item's severity is filtered out
Previously, toggling any severity filter always hid the description and attack vector panels. Now the panels are only cleared when the currently displayed item belongs to a severity that was just disabled. If the item's severity is still active, the panels stay visible. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 4c47664 commit d0e4723

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ public class CheckmarxView extends ViewPart implements EventHandler {
160160
private Text commentText;
161161
private DisplayModel rootModel;
162162
private String selectedSeverity, selectedState;
163+
private DisplayModel currentlyDisplayedItem;
163164
private Button triageButton;
164165
private SelectionAdapter triageButtonAdapter, codeBashingAdapter;
165166
private Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
@@ -1385,6 +1386,7 @@ protected IStatus run(IProgressMonitor arg0) {
13851386

13861387
if (selectedItem.getResult() != null && selectedItem.getResult().getSimilarityId() != null) {
13871388
sync.asyncExec(() -> {
1389+
currentlyDisplayedItem = selectedItem;
13881390
createTriageSeverityAndStateCombos(selectedItem);
13891391
populateTriageChanges(selectedItem);
13901392
resultViewComposite.setVisible(true);
@@ -2488,8 +2490,12 @@ private void listener(PluginListenerDefinition definition) {
24882490

24892491
private void updateResultsTree(List<DisplayModel> results, boolean expand) {
24902492
sync.asyncExec(() -> {
2491-
resultViewComposite.setVisible(false);
2492-
attackVectorCompositePanel.setVisible(false);
2493+
if (currentlyDisplayedItem == null
2494+
|| currentlyDisplayedItem.getSeverity() == null
2495+
|| !FilterState.isSeverityEnabled(currentlyDisplayedItem.getSeverity())) {
2496+
resultViewComposite.setVisible(false);
2497+
attackVectorCompositePanel.setVisible(false);
2498+
}
24932499
rootModel.children.clear();
24942500
rootModel.children.addAll(results);
24952501
Object[] expanded = resultsTree.getExpandedElements();

0 commit comments

Comments
 (0)