mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Breakpoint remove should be executed in write action like breakpoint add in XDebuggerTestUtil.
This commit is contained in:
@@ -65,7 +65,8 @@ public class XDebuggerTestUtil {
|
||||
XBreakpointManager manager = XDebuggerManager.getInstance(project).getBreakpointManager();
|
||||
XLineBreakpointImpl breakpoint = (XLineBreakpointImpl)manager.findBreakpointAtLine(type, file, line);
|
||||
Assert.assertNotNull(breakpoint);
|
||||
Assert.assertEquals(validity ? AllIcons.Debugger.Db_verified_breakpoint : AllIcons.Debugger.Db_invalid_breakpoint, breakpoint.getIcon());
|
||||
Assert
|
||||
.assertEquals(validity ? AllIcons.Debugger.Db_verified_breakpoint : AllIcons.Debugger.Db_invalid_breakpoint, breakpoint.getIcon());
|
||||
Assert.assertEquals(errorMessage, breakpoint.getErrorMessage());
|
||||
}
|
||||
|
||||
@@ -303,7 +304,8 @@ public class XDebuggerTestUtil {
|
||||
expectedNames.removeAll(actualNames);
|
||||
UsefulTestCase.assertTrue("Missing variables:" + StringUtil.join(expectedNames, ", ")
|
||||
+ "\nAll Variables: " + StringUtil.join(actualNames, ", "),
|
||||
expectedNames.isEmpty());
|
||||
expectedNames.isEmpty()
|
||||
);
|
||||
}
|
||||
|
||||
public static void assertSourcePosition(final XValue value, VirtualFile file, int offset) {
|
||||
@@ -366,8 +368,13 @@ public class XDebuggerTestUtil {
|
||||
public static void removeAllBreakpoints(@NotNull final Project project) {
|
||||
final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
|
||||
XBreakpoint<?>[] breakpoints = breakpointManager.getAllBreakpoints();
|
||||
for (XBreakpoint b : breakpoints) {
|
||||
breakpointManager.removeBreakpoint(b);
|
||||
for (final XBreakpoint b : breakpoints) {
|
||||
new WriteAction() {
|
||||
@Override
|
||||
protected void run(Result result) throws Throwable {
|
||||
breakpointManager.removeBreakpoint(b);
|
||||
}
|
||||
}.execute();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user