IDEA-132852 Debugger: values in editor are still shown after disconnect - fix for...
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 20 May 2015 11:36:33 +0000 (14:36 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 20 May 2015 11:37:23 +0000 (14:37 +0300)
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesView.java

index b75002919dce1c916519a88018545402301ecf0f..4b5a5f8bca3e7075b2aa945ab24d8ceeb76304cc 100644 (file)
@@ -68,12 +68,22 @@ public class XVariablesView extends XVariablesViewBase {
   }
 
   @Override
-  protected void clear() {
-    XDebuggerTree tree = getTree();
+  public void dispose() {
+    clearInlineData(getTree());
+    super.dispose();
+  }
+
+  private static void clearInlineData(XDebuggerTree tree) {
     tree.getProject().putUserData(DEBUG_VARIABLES, null);
     tree.getProject().putUserData(DEBUG_VARIABLES_TIMESTAMPS, null);
-    tree.setSourcePosition(null);
     tree.updateEditor();
+  }
+
+  @Override
+  protected void clear() {
+    XDebuggerTree tree = getTree();
+    tree.setSourcePosition(null);
+    clearInlineData(tree);
 
     XDebuggerTreeNode node;
     XDebugSession session = getSession(getPanel());