mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
correctly show watches tab after add to watch even in mixed watches/variables mode
This commit is contained in:
+1
-18
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package com.intellij.xdebugger.impl.frame;
|
||||
|
||||
import com.intellij.debugger.ui.DebuggerContentInfo;
|
||||
import com.intellij.execution.ui.layout.impl.RunnerContentUi;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.ide.dnd.DnDEvent;
|
||||
@@ -292,22 +290,7 @@ public class XWatchesViewImpl extends XVariablesView implements DnDNativeTarget,
|
||||
myRootNode.addWatchExpression(session != null ? session.getCurrentStackFrame() : null, expression, index, navigateToWatchNode);
|
||||
updateSessionData();
|
||||
if (navigateToWatchNode && session != null) {
|
||||
showWatchesTab((XDebugSessionImpl)session);
|
||||
}
|
||||
}
|
||||
|
||||
private static void showWatchesTab(@NotNull XDebugSessionImpl session) {
|
||||
XDebugSessionTab tab = session.getSessionTab();
|
||||
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(DebuggerContentInfo.WATCHES_CONTENT);
|
||||
}
|
||||
}
|
||||
XDebugSessionTab.showWatchesView((XDebugSessionImpl)session);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.intellij.execution.ui.RunContentDescriptor;
|
||||
import com.intellij.execution.ui.RunnerLayoutUi;
|
||||
import com.intellij.execution.ui.actions.CloseAction;
|
||||
import com.intellij.execution.ui.layout.PlaceInGrid;
|
||||
import com.intellij.execution.ui.layout.impl.RunnerContentUi;
|
||||
import com.intellij.execution.ui.layout.impl.ViewImpl;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.DataManager;
|
||||
@@ -340,6 +341,21 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
}
|
||||
}
|
||||
|
||||
public static void showWatchesView(@NotNull XDebugSessionImpl session) {
|
||||
XDebugSessionTab tab = session.getSessionTab();
|
||||
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.myWatchesInVariables ? DebuggerContentInfo.VARIABLES_CONTENT : DebuggerContentInfo.WATCHES_CONTENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void registerView(String contentId, @NotNull XDebugView view) {
|
||||
myViews.put(contentId, view);
|
||||
Disposer.register(myRunContentDescriptor, view);
|
||||
|
||||
Reference in New Issue
Block a user