mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
prepare to implement firefox evaluate
This commit is contained in:
@@ -43,6 +43,15 @@ public interface BreakpointManager {
|
||||
@NotNull
|
||||
Promise<Void> flush(@NotNull Breakpoint breakpoint);
|
||||
|
||||
/**
|
||||
* Asynchronously enables or disables all breakpoints on remote. 'Enabled' means that
|
||||
* breakpoints behave as normal, 'disabled' means that VM doesn't stop on breakpoints.
|
||||
* It doesn't update individual properties of {@link Breakpoint}s. Method call
|
||||
* with a null value and not null callback simply returns current value.
|
||||
*/
|
||||
@NotNull
|
||||
Promise<?> enableBreakpoints(boolean enabled);
|
||||
|
||||
interface BreakpointListener extends EventListener {
|
||||
void resolved(@NotNull Breakpoint breakpoint);
|
||||
|
||||
|
||||
@@ -152,4 +152,10 @@ public abstract class BreakpointManagerBase<T extends BreakpointBase<?>> impleme
|
||||
public Promise<Void> flush(@NotNull Breakpoint breakpoint) {
|
||||
return ((T)breakpoint).flush(this);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Promise<?> enableBreakpoints(boolean enabled) {
|
||||
return Promise.reject("Unsupported");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.jetbrains.debugger;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.concurrency.Promise;
|
||||
|
||||
public interface Vm {
|
||||
@@ -23,23 +24,13 @@ public interface Vm {
|
||||
@NotNull
|
||||
SuspendContextManager getSuspendContextManager();
|
||||
|
||||
/**
|
||||
* Asynchronously enables or disables all breakpoints on remote. 'Enabled' means that
|
||||
* breakpoints behave as normal, 'disabled' means that VM doesn't stop on breakpoints.
|
||||
* It doesn't update individual properties of {@link Breakpoint}s. Method call
|
||||
* with a null value and not null callback simply returns current value.
|
||||
* @param enabled new value to set or null
|
||||
*/
|
||||
@NotNull
|
||||
Promise<?> enableBreakpoints(boolean enabled);
|
||||
|
||||
/**
|
||||
* Controls whether VM stops on exceptions
|
||||
*/
|
||||
@NotNull
|
||||
Promise<?> setBreakOnException(@NotNull ExceptionCatchMode catchMode);
|
||||
|
||||
@NotNull
|
||||
@Nullable("if global evaluate not supported")
|
||||
EvaluateContext getEvaluateContext();
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.jetbrains.debugger;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.concurrency.Promise;
|
||||
|
||||
public abstract class VmBase implements Vm, Vm.AttachStateManager {
|
||||
@@ -11,7 +12,7 @@ public abstract class VmBase implements Vm, Vm.AttachStateManager {
|
||||
this.debugListener = debugListener;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nullable
|
||||
@Override
|
||||
public final synchronized EvaluateContext getEvaluateContext() {
|
||||
if (evaluateContext == null) {
|
||||
@@ -20,8 +21,10 @@ public abstract class VmBase implements Vm, Vm.AttachStateManager {
|
||||
return evaluateContext;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected abstract EvaluateContext computeEvaluateContext();
|
||||
@Nullable
|
||||
protected EvaluateContext computeEvaluateContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user