File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/kotlin/com/github/adrienpessu/sarifviewer/toolWindow Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -444,7 +444,13 @@ class SarifViewerWindowFactory : ToolWindowFactory {
444444 myList.addTreeSelectionListener(object : TreeSelectionListener {
445445 override fun valueChanged (e : TreeSelectionEvent ? ) {
446446 if (e != null && e.isAddedPath) {
447- val leaves = map[e.path.parentPath.lastPathComponent.toString().split(" " ).first()]
447+ val key = e.path.parentPath.lastPathComponent.toString()
448+ // path (count)
449+ val leaves1 = map[key.split(" " ).first()]
450+ // bug desc (count)
451+ val leaves2 = map[key.substring(0 , key.lastIndexOf(' ' ))]
452+ val leaves = (leaves1.orEmpty() + leaves2.orEmpty()).takeIf { it.isNotEmpty() }
453+
448454 if (! leaves.isNullOrEmpty()) {
449455 currentLeaf = try {
450456 leaves.first { it.address == ((e.path.lastPathComponent as DefaultMutableTreeNode ).userObject as Leaf ).address }
You can’t perform that action at this time.
0 commit comments