Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BFergerson committed Sep 2, 2022
1 parent af54ecb commit 7012b63
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
package spp.jetbrains.sourcemarker.service.instrument.breakpoint.ui

import com.intellij.openapi.Disposable
import com.intellij.openapi.util.Key
import com.intellij.ui.ClientProperty
import com.intellij.ui.components.JBScrollPane
import com.intellij.ui.tree.AsyncTreeModel
import com.intellij.ui.tree.StructureTreeModel
import com.intellij.ui.tree.ui.DefaultTreeUI
import com.intellij.ui.treeStructure.Tree
import org.joor.Reflect
import spp.jetbrains.sourcemarker.service.instrument.breakpoint.DebugStackFrameListener
import spp.jetbrains.sourcemarker.service.instrument.breakpoint.StackFrameManager
import spp.jetbrains.sourcemarker.service.instrument.breakpoint.tree.VariableSimpleTreeStructure
Expand Down Expand Up @@ -48,6 +52,11 @@ class VariableTab : DebugStackFrameListener, Disposable {
tree.isRootVisible = false
component = JPanel(BorderLayout())
component.add(JBScrollPane(tree), "Center")

//todo: temporary fix for #575
val AUTO_EXPAND_ALLOWED = Reflect.onClass(DefaultTreeUI::class.java)
.get<Key<Boolean>>("AUTO_EXPAND_ALLOWED")
ClientProperty.put(tree, AUTO_EXPAND_ALLOWED, false)
}

override fun onChanged(stackFrameManager: StackFrameManager) {
Expand Down

0 comments on commit 7012b63

Please sign in to comment.