debugger: removed deprecated methods

GitOrigin-RevId: e905005aa272323c9683a4ffe9cd3b9709c70a0f
This commit is contained in:
Egor Ushakov
2023-09-18 16:19:32 +02:00
committed by intellij-monorepo-bot
parent 4dd2b9f6a2
commit 03c485761b
4 changed files with 9 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.xdebugger;
@@ -105,12 +105,12 @@ public interface XDebugSession extends AbstractDebuggerSession {
void setBreakpointInvalid(@NotNull XLineBreakpoint<?> breakpoint, @Nullable String errorMessage);
/**
* Call this method when a breakpoint is reached if its condition ({@link XBreakpoint#getCondition()}) evaluates to {@code true}.
* Call this method when a breakpoint is reached if its condition ({@link XBreakpoint#getConditionExpression()}) evaluates to {@code true}.
* <p>
* <strong>The underlying debugging process should be suspended only if the method returns {@code true}.</strong>
*
* @param breakpoint reached breakpoint
* @param evaluatedLogExpression value of {@link XBreakpoint#getLogExpression()} evaluated in the current context
* @param evaluatedLogExpression value of {@link XBreakpoint#getLogExpressionObject()} evaluated in the current context
* @param suspendContext context
* @return {@code true} if the debug process should be suspended
*/

View File

@@ -1,6 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.xdebugger.breakpoints;
@@ -48,13 +46,6 @@ public interface XBreakpoint<P extends XBreakpointProperties> extends UserDataHo
void setLogStack(boolean logStack);
/**
* @deprecated use {@link #getLogExpressionObject()} instead
*/
@Deprecated
@Nullable
String getLogExpression();
void setLogExpression(@Nullable String expression);
@Nullable
@@ -62,13 +53,6 @@ public interface XBreakpoint<P extends XBreakpointProperties> extends UserDataHo
void setLogExpressionObject(@Nullable XExpression expression);
/**
* @deprecated use {@link #getConditionExpression()} instead
*/
@Deprecated
@Nullable
String getCondition();
void setCondition(@Nullable String condition);
@Nullable

View File

@@ -203,7 +203,6 @@ public class XBreakpointBase<Self extends XBreakpoint<P>, P extends XBreakpointP
}
}
@Override
public String getLogExpression() {
XExpression expression = getLogExpressionObject();
return expression != null ? expression.getExpression() : null;
@@ -235,7 +234,6 @@ public class XBreakpointBase<Self extends XBreakpoint<P>, P extends XBreakpointP
}
}
@Override
public String getCondition() {
XExpression expression = getConditionExpression();
return expression != null ? expression.getExpression() : null;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.xdebugger;
import com.intellij.openapi.util.JDOMUtil;
@@ -66,8 +66,8 @@ public class XBreakpointManagerTest extends XBreakpointsTestCase {
assertEquals(239, lineBreakpoint.getLine());
assertEquals("myurl", lineBreakpoint.getFileUrl());
assertEquals("z1", assertInstanceOf(lineBreakpoint.getProperties(), MyBreakpointProperties.class).myOption);
assertEquals("cond", lineBreakpoint.getCondition());
assertEquals("log", lineBreakpoint.getLogExpression());
assertEquals("cond", lineBreakpoint.getConditionExpression().getExpression());
assertEquals("log", lineBreakpoint.getLogExpressionObject().getExpression());
assertTrue(lineBreakpoint.isLogMessage());
assertEquals(SuspendPolicy.NONE, lineBreakpoint.getSuspendPolicy());
@@ -158,8 +158,8 @@ public class XBreakpointManagerTest extends XBreakpointsTestCase {
"</breakpoint-manager>";
load(JDOMUtil.load(oldStyle));
XLineBreakpoint<MyBreakpointProperties> breakpoint = assertOneElement(myBreakpointManager.getBreakpoints(MY_LINE_BREAKPOINT_TYPE));
assertEquals(condition, breakpoint.getCondition());
assertEquals(logExpression, breakpoint.getLogExpression());
assertEquals(condition, breakpoint.getConditionExpression().getExpression());
assertEquals(logExpression, breakpoint.getLogExpressionObject().getExpression());
}
private XBreakpoint<MyBreakpointProperties> getSingleBreakpoint() {