IDEA-CR-8978 deprecate old methods

This commit is contained in:
Vladimir Krivosheev
2016-03-23 13:41:57 +01:00
parent a5d13c5adf
commit fea4f11ef7
5 changed files with 69 additions and 36 deletions
@@ -55,6 +55,7 @@ import com.intellij.xdebugger.breakpoints.XBreakpoint;
import com.intellij.xdebugger.breakpoints.XBreakpointHandler;
import com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider;
import com.intellij.xdebugger.frame.XStackFrame;
import com.intellij.xdebugger.frame.XSuspendContext;
import com.intellij.xdebugger.frame.XValueMarkerProvider;
import com.intellij.xdebugger.impl.XDebugSessionImpl;
import com.intellij.xdebugger.impl.XDebuggerUtilImpl;
@@ -240,22 +241,22 @@ public class JavaDebugProcess extends XDebugProcess {
}
@Override
public void startStepOver() {
public void startStepOver(@Nullable XSuspendContext context) {
myJavaSession.stepOver(false);
}
@Override
public void startStepInto() {
public void startStepInto(@Nullable XSuspendContext context) {
myJavaSession.stepInto(false, null);
}
@Override
public void startForceStepInto() {
public void startForceStepInto(@Nullable XSuspendContext context) {
myJavaSession.stepInto(true, null);
}
@Override
public void startStepOut() {
public void startStepOut(@Nullable XSuspendContext context) {
myJavaSession.stepOut();
}
@@ -271,12 +272,12 @@ public class JavaDebugProcess extends XDebugProcess {
}
@Override
public void resume() {
public void resume(@Nullable XSuspendContext context) {
myJavaSession.resume();
}
@Override
public void runToPosition(@NotNull XSourcePosition position) {
public void runToPosition(@NotNull XSourcePosition position, @Nullable XSuspendContext context) {
myJavaSession.runToCursor(position, false);
}
@@ -197,7 +197,7 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl
protected open fun checkDuplicates(newTarget: BreakpointTarget, location: Location, breakpointManager: BreakpointManager): Breakpoint? = null
fun runToLocation(position: XSourcePosition) {
fun runToLocation(position: XSourcePosition, vm: Vm) {
val addedBreakpoints = doRunToLocation(position)
if (addedBreakpoints.isEmpty()) {
return
@@ -206,7 +206,7 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl
synchronized (lock) {
runToLocationBreakpoints.addAll(addedBreakpoints)
}
debugProcess.resume(debugProcess.activeOrMainVm!!)
debugProcess.resume(vm)
}
protected abstract fun doRunToLocation(position: XSourcePosition): List<Breakpoint>
@@ -88,32 +88,51 @@ public abstract class XDebugProcess {
public void startPausing() {
}
@Deprecated
/**
* Resume execution and call {@link XDebugSession#positionReached}
* when next line in current method/function is reached.
* Do not call this method directly. Use {@link XDebugSession#stepOver} instead
* @deprecated Use {@link #startStepOver(XSuspendContext)} instead
*/
public void startStepOver() {
throw new AbstractMethodError();
}
/**
* Resume execution and call {@link XDebugSession#positionReached}
* when next line in current method/function is reached.
* Do not call this method directly. Use {@link XDebugSession#stepOver} instead
*/
public void startStepOver(@Nullable XSuspendContext context) {
//noinspection deprecation
startStepOver();
}
@Deprecated
/**
* @deprecated Use {@link #startForceStepInto(XSuspendContext)} instead
*/
public void startForceStepInto(){
//noinspection deprecation
startStepInto();
}
/**
* Steps into suppressed call
*
* <p>
* Resume execution and call {@link XDebugSession#positionReached}
* when next line is reached.
* Do not call this method directly. Use {@link XDebugSession#forceStepInto} instead
*/
public void startForceStepInto(){
startStepInto();
public void startForceStepInto(@Nullable XSuspendContext context) {
//noinspection deprecation
startForceStepInto();
}
public void startForceStepInto(@Nullable XSuspendContext context) {
startForceStepInto();
@Deprecated
/**
* @deprecated Use {@link #startStepInto(XSuspendContext)} instead
*/
public void startStepInto() {
throw new AbstractMethodError();
}
/**
@@ -121,12 +140,17 @@ public abstract class XDebugProcess {
* when next line is reached.
* Do not call this method directly. Use {@link XDebugSession#stepInto} instead
*/
public void startStepInto() {
throw new AbstractMethodError();
public void startStepInto(@Nullable XSuspendContext context) {
//noinspection deprecation
startStepInto();
}
public void startStepInto(@Nullable XSuspendContext context) {
startStepInto();
@Deprecated
/**
* @deprecated Use {@link #startStepOut(XSuspendContext)} instead
*/
public void startStepOut() {
throw new AbstractMethodError();
}
/**
@@ -134,11 +158,8 @@ public abstract class XDebugProcess {
* after returning from current method/function.
* Do not call this method directly. Use {@link XDebugSession#stepOut} instead
*/
public void startStepOut() {
throw new AbstractMethodError();
}
public void startStepOut(@Nullable XSuspendContext context) {
//noinspection deprecation
startStepOut();
}
@@ -165,29 +186,40 @@ public abstract class XDebugProcess {
return Promise.DONE;
}
@Deprecated
/**
* Resume execution.
* Do not call this method directly. Use {@link XDebugSession#resume} instead
* @deprecated Use {@link #resume(XSuspendContext)} instead
*/
public void resume() {
throw new AbstractMethodError();
}
/**
* Resume execution.
* Do not call this method directly. Use {@link XDebugSession#resume} instead
*/
public void resume(@Nullable XSuspendContext context) {
//noinspection deprecation
resume();
}
@Deprecated
/**
* @deprecated Use {@link #runToPosition(XSuspendContext)} instead
*/
public void runToPosition(@NotNull XSourcePosition position) {
throw new AbstractMethodError();
}
/**
* Resume execution and call {@link XDebugSession#positionReached(com.intellij.xdebugger.frame.XSuspendContext)}
* when <code>position</code> is reached.
* Do not call this method directly. Use {@link XDebugSession#runToPosition} instead
*
* @param position position in source code
*/
public void runToPosition(@NotNull XSourcePosition position) {
throw new AbstractMethodError();
}
public void runToPosition(@NotNull XSourcePosition position, @Nullable XSuspendContext context) {
//noinspection deprecation
runToPosition(position);
}
@@ -121,17 +121,17 @@ public class XsltDebugProcess extends XDebugProcess implements Disposable {
}
@Override
public void startStepOver() {
public void startStepOver(@Nullable XSuspendContext context) {
myDebuggerSession.stepOver();
}
@Override
public void startStepInto() {
public void startStepInto(@Nullable XSuspendContext context) {
myDebuggerSession.stepInto();
}
@Override
public void startStepOut() {
public void startStepOut(@Nullable XSuspendContext context) {
myDebuggerSession.stepOver();
}
@@ -155,7 +155,7 @@ public class XsltDebugProcess extends XDebugProcess implements Disposable {
}
@Override
public void resume() {
public void resume(@Nullable XSuspendContext context) {
myDebuggerSession.resume();
}
@@ -164,7 +164,7 @@ public class XsltDebugProcess extends XDebugProcess implements Disposable {
}
@Override
public void runToPosition(@NotNull XSourcePosition position) {
public void runToPosition(@NotNull XSourcePosition position, @Nullable XSuspendContext context) {
final PsiFile psiFile = PsiManager.getInstance(getSession().getProject()).findFile(position.getFile());
assert psiFile != null;
if (myDebuggerSession.canRunTo(position)) {
@@ -407,7 +407,7 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr
}
@Override
public void resume() {
public void resume(@Nullable XSuspendContext context) {
passToAllThreads(ResumeOrStepCommand.Mode.RESUME);
}