microsoft / sarif-visualstudio-extension

SARIF Microsoft Visual Studio Viewer Extension
MIT License
46 stars 19 forks source link

Use TreeView for Related Locations #533

Closed EasyRhinoMSFT closed 2 years ago

EasyRhinoMSFT commented 2 years ago

This change moves Related Locations from a ListView to a TreeView. A Result can specify an int property called NestingLevel that indicates its depth in the tree. NestingLevel values are expected to be in zero-based and sequentially numbered in depth-first order. For example, this tree would be described with these NestingLevel values, with result objects in this order:

image

If the NestingLevel property is not specified, it has an implied value of zero and is therefore a root node. Tab traversal is improved, and navigation to locations is performed by double-click, Enter, or spacebar. To enable key binding, a new control class that inherits TreeView is necessary.

image

This shows a selected item (gray) and a mouse-over item:

image