Merge remote-tracking branch 'origin/master' into amakeev/debugger clion/162.692
authorAnton Makeev <Anton.Makeev@jetbrains.com>
Wed, 1 Jun 2016 13:16:42 +0000 (15:16 +0200)
committerAnton Makeev <Anton.Makeev@jetbrains.com>
Wed, 1 Jun 2016 13:16:42 +0000 (15:16 +0200)
# Conflicts:
# platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebugSessionTab.java

1  2 
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebugSessionTab.java

index ac0e72cc88b628c1cebccbdce0c39b1f73caf3a1,87b0ddba8ecc4cf8824d6b1e71176be6be130922..d68dcf04c901448b7272d7db6aed462024bcb7cf
@@@ -351,20 -341,7 +352,21 @@@ public class XDebugSessionTab extends D
      if (tab != null) {
        tab.toFront(false, null);
        // restore watches tab if minimized
 -      tab.restoreContent(tab.getWatchesContentId());
++      tab.restoreContent(viewId);
++
 +      JComponent component = tab.getUi().getComponent();
 +      if (component instanceof DataProvider) {
 +        RunnerContentUi ui = RunnerContentUi.KEY.getData(((DataProvider)component));
 +        if (ui != null) {
-           ui.restoreContent(viewId);
 +          Content content = ui.findContent(viewId);
 +
 +          // if the view is not visible (e.g. Console tab is selected, while Debugger tab is not)
 +          // make sure we make it visible to the user
 +          if (content != null) {
 +            ui.select(content, false);
 +          }
 +        }
 +      }
      }
    }