mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-121775 XDebugger: merge Watches and Variables in one view - do not evaluate invisible watches
This commit is contained in:
@@ -300,14 +300,11 @@ public class XWatchesViewImpl extends XVariablesView implements DnDNativeTarget,
|
||||
|
||||
@Override
|
||||
public void processSessionEvent(@NotNull final SessionEvent event) {
|
||||
if (myWatchesInVariables ||
|
||||
getPanel().isShowing() ||
|
||||
ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
if (getPanel().isShowing() || ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
myRebuildNeeded = false;
|
||||
}
|
||||
else {
|
||||
myRebuildNeeded = true;
|
||||
return;
|
||||
}
|
||||
super.processSessionEvent(event);
|
||||
}
|
||||
|
||||
@@ -121,8 +121,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
@Override
|
||||
public void selectionChanged(ContentManagerEvent event) {
|
||||
Content content = event.getContent();
|
||||
XDebugSessionImpl session = mySession;
|
||||
if (session != null && content.isSelected() && DebuggerContentInfo.WATCHES_CONTENT.equals(ViewImpl.ID.get(content))) {
|
||||
if (mySession != null && content.isSelected() && getWatchesContentId().equals(ViewImpl.ID.get(content))) {
|
||||
myRebuildWatchesRunnable.run();
|
||||
}
|
||||
}
|
||||
@@ -340,12 +339,17 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
if (component instanceof DataProvider) {
|
||||
RunnerContentUi ui = RunnerContentUi.KEY.getData(((DataProvider)component));
|
||||
if (ui != null) {
|
||||
ui.restoreContent(tab.myWatchesInVariables ? DebuggerContentInfo.VARIABLES_CONTENT : DebuggerContentInfo.WATCHES_CONTENT);
|
||||
ui.restoreContent(tab.getWatchesContentId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String getWatchesContentId() {
|
||||
return myWatchesInVariables ? DebuggerContentInfo.VARIABLES_CONTENT : DebuggerContentInfo.WATCHES_CONTENT;
|
||||
}
|
||||
|
||||
private void registerView(String contentId, @NotNull XDebugView view) {
|
||||
myViews.put(contentId, view);
|
||||
Disposer.register(myRunContentDescriptor, view);
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public class WatchNodeImpl extends XValueNodeImpl implements WatchNode {
|
||||
@NotNull WatchesRootNode parent,
|
||||
@NotNull XExpression expression,
|
||||
@Nullable XStackFrame stackFrame) {
|
||||
super(tree, parent, expression.getExpression(), new XWatchValue(expression, stackFrame));
|
||||
super(tree, parent, expression.getExpression(), new XWatchValue(expression, tree.isShowing() ? stackFrame : null));
|
||||
myExpression = expression;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user