IDEA-156761 'Show watches in variables tab' button moves to Server tab

This commit is contained in:
Egor.Ushakov
2016-05-31 13:08:12 +03:00
parent d86754db74
commit 8ae75b60f4
@@ -330,6 +330,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
addVariablesAndWatches(mySession);
attachViewToSession(mySession, myViews.get(DebuggerContentInfo.VARIABLES_CONTENT));
attachViewToSession(mySession, myViews.get(DebuggerContentInfo.WATCHES_CONTENT));
myUi.selectAndFocus(myUi.findContent(DebuggerContentInfo.VARIABLES_CONTENT), true, false);
rebuildViews();
}
}
@@ -340,13 +341,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
if (tab != null) {
tab.toFront(false, null);
// restore watches tab if minimized
JComponent component = tab.getUi().getComponent();
if (component instanceof DataProvider) {
RunnerContentUi ui = RunnerContentUi.KEY.getData(((DataProvider)component));
if (ui != null) {
ui.restoreContent(tab.getWatchesContentId());
}
}
tab.restoreContent(tab.getWatchesContentId());
}
}
@@ -394,10 +389,21 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
}
private void removeContent(String contentId) {
restoreContent(contentId); //findContent returns null if content is minimized
myUi.removeContent(myUi.findContent(contentId), true);
XDebugView view = myViews.remove(contentId);
if (view != null) {
Disposer.dispose(view);
}
}
private void restoreContent(String contentId) {
JComponent component = myUi.getComponent();
if (component instanceof DataProvider) {
RunnerContentUi ui = RunnerContentUi.KEY.getData(((DataProvider)component));
if (ui != null) {
ui.restoreContent(contentId);
}
}
}
}