Search in sources :

Example 1 with InspectDebuggerTree

use of com.intellij.debugger.ui.impl.InspectDebuggerTree in project intellij-community by JetBrains.

the class ValueHint method createInspectTree.

public static InspectDebuggerTree createInspectTree(final NodeDescriptorImpl descriptor, Project project) {
    final InspectDebuggerTree tree = new InspectDebuggerTree(project);
    final AnAction setValueAction = ActionManager.getInstance().getAction(DebuggerActions.SET_VALUE);
    setValueAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)), tree);
    Disposer.register(tree, new Disposable() {

        @Override
        public void dispose() {
            setValueAction.unregisterCustomShortcutSet(tree);
        }
    });
    tree.setInspectDescriptor(descriptor);
    DebuggerContextImpl context = DebuggerManagerEx.getInstanceEx(project).getContext();
    tree.rebuild(context);
    return tree;
}
Also used : Disposable(com.intellij.openapi.Disposable) CustomShortcutSet(com.intellij.openapi.actionSystem.CustomShortcutSet) InspectDebuggerTree(com.intellij.debugger.ui.impl.InspectDebuggerTree) DebuggerContextImpl(com.intellij.debugger.impl.DebuggerContextImpl) AnAction(com.intellij.openapi.actionSystem.AnAction)

Aggregations

DebuggerContextImpl (com.intellij.debugger.impl.DebuggerContextImpl)1 InspectDebuggerTree (com.intellij.debugger.ui.impl.InspectDebuggerTree)1 Disposable (com.intellij.openapi.Disposable)1 AnAction (com.intellij.openapi.actionSystem.AnAction)1 CustomShortcutSet (com.intellij.openapi.actionSystem.CustomShortcutSet)1