diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/AbstractValueHint.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/AbstractValueHint.java index b0cd2ea0acfb..b34cadfd295e 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/AbstractValueHint.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/AbstractValueHint.java @@ -299,7 +299,7 @@ public abstract class AbstractValueHint { } protected void showTreePopup(@NotNull DebuggerTreeCreator creator, @NotNull D descriptor) { - DebuggerTreeWithHistoryPopup.showTreePopup(creator, descriptor, getEditor(), myPoint, getProject()); + DebuggerTreeWithHistoryPopup.showTreePopup(creator, descriptor, getEditor(), myPoint, getProject(), myHideRunnable); } @Override diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/DebuggerTreeWithHistoryPopup.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/DebuggerTreeWithHistoryPopup.java index e946802fb13c..5ece7fd82ecd 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/DebuggerTreeWithHistoryPopup.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/DebuggerTreeWithHistoryPopup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,9 @@ package com.intellij.xdebugger.impl.evaluate.quick.common; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.popup.JBPopup; +import com.intellij.openapi.ui.popup.JBPopupAdapter; import com.intellij.openapi.ui.popup.JBPopupFactory; +import com.intellij.openapi.ui.popup.LightweightWindowEvent; import com.intellij.openapi.util.Computable; import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.ScreenUtil; @@ -30,6 +32,7 @@ import com.intellij.util.BooleanFunction; import com.intellij.util.ui.tree.TreeModelAdapter; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import javax.swing.*; import javax.swing.event.TreeModelEvent; @@ -46,16 +49,23 @@ class DebuggerTreeWithHistoryPopup extends DebuggerTreeWithHistoryContainer creator, @NotNull Editor editor, @NotNull Point point, @NotNull Project project) { + private DebuggerTreeWithHistoryPopup(@NotNull D initialItem, + @NotNull DebuggerTreeCreator creator, + @NotNull Editor editor, + @NotNull Point point, + @NotNull Project project, + @Nullable Runnable hideRunnable) { super(initialItem, creator, project); myEditor = editor; myPoint = point; + myHideRunnable = hideRunnable; } public static void showTreePopup(@NotNull DebuggerTreeCreator creator, @NotNull D initialItem, @NotNull Editor editor, - @NotNull Point point, @NotNull Project project) { - new DebuggerTreeWithHistoryPopup(initialItem, creator, editor, point, project).updateTree(initialItem); + @NotNull Point point, @NotNull Project project, Runnable hideRunnable) { + new DebuggerTreeWithHistoryPopup(initialItem, creator, editor, point, project, hideRunnable).updateTree(initialItem); } private TreeModelListener createTreeListener(final Tree tree) { @@ -91,6 +101,14 @@ class DebuggerTreeWithHistoryPopup extends DebuggerTreeWithHistoryContainer() { @Override public Boolean compute() {