From 5034eb283a0e1cfc082cd482aa77a10512db41d8 Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Thu, 23 Jun 2011 17:50:20 +0400 Subject: [PATCH] Env tests: tests for debugger log expressions. --- .../intellij/xdebugger/XDebuggerTestUtil.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java b/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java index 4773798a5a5b..217639a04099 100644 --- a/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java +++ b/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java @@ -250,6 +250,25 @@ public class XDebuggerTestUtil { } } + public static void setBreakpointLogExpression(Project project, int line, final String logExpression) { + XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager(); + for (XBreakpoint breakpoint : breakpointManager.getAllBreakpoints()) { + if (breakpoint instanceof XLineBreakpoint) { + final XLineBreakpoint lineBreakpoint = (XLineBreakpoint)breakpoint; + + if (lineBreakpoint.getLine() == line) { + new WriteAction() { + @Override + protected void run(Result result) throws Throwable { + lineBreakpoint.setLogExpression(logExpression); + lineBreakpoint.setLogMessage(true); + } + }.execute(); + } + } + } + } + public static class XTestStackFrameContainer extends XTestContainer implements XExecutionStack.XStackFrameContainer { public void addStackFrames(@NotNull List stackFrames, boolean last) { addChildren(stackFrames, last); -- 2.32.0