mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
get rid of EvaluateContextAdditionalParameter — in any case it is implementation details, so, we cannot really restrict param type — just add complexity
This commit is contained in:
@@ -17,7 +17,7 @@ public interface EvaluateContext {
|
||||
* additionalContext parameter.
|
||||
*/
|
||||
@NotNull
|
||||
Promise<EvaluateResult> evaluate(@NotNull String expression, @Nullable Map<String, EvaluateContextAdditionalParameter> additionalContext, boolean enableBreak);
|
||||
Promise<EvaluateResult> evaluate(@NotNull String expression, @Nullable Map<String, Object> additionalContext, boolean enableBreak);
|
||||
|
||||
@NotNull
|
||||
Promise<EvaluateResult> evaluate(@NotNull String expression);
|
||||
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
package org.jetbrains.debugger;
|
||||
|
||||
public interface EvaluateContextAdditionalParameter {
|
||||
}
|
||||
+1
-1
@@ -38,7 +38,7 @@ public abstract class EvaluateContextBase<VALUE_MANAGER extends ValueManager> im
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public abstract Promise<EvaluateResult> evaluate(@NotNull String expression, @Nullable Map<String, EvaluateContextAdditionalParameter> additionalContext, boolean enableBreak);
|
||||
public abstract Promise<EvaluateResult> evaluate(@NotNull String expression, @Nullable Map<String, Object> additionalContext, boolean enableBreak);
|
||||
|
||||
@NotNull
|
||||
public final VALUE_MANAGER getValueManager() {
|
||||
|
||||
@@ -26,7 +26,7 @@ public final class ValueModifierUtil {
|
||||
|
||||
@NotNull
|
||||
public static Promise<Value> evaluateGet(@NotNull final Variable variable,
|
||||
@NotNull EvaluateContextAdditionalParameter host,
|
||||
@NotNull Object host,
|
||||
@NotNull EvaluateContext evaluateContext,
|
||||
@NotNull String selfName) {
|
||||
StringBuilder builder = new StringBuilder(selfName);
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package org.jetbrains.debugger.values;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.debugger.EvaluateContextAdditionalParameter;
|
||||
|
||||
/**
|
||||
* An object that represents a VM variable value (compound or atomic).
|
||||
*/
|
||||
public interface Value extends EvaluateContextAdditionalParameter {
|
||||
public interface Value {
|
||||
@NotNull
|
||||
ValueType getType();
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public final class VariableView extends XNamedValue implements VariableContext {
|
||||
node.setPresentation(icon, null, valueString, true);
|
||||
}
|
||||
else {
|
||||
context.getEvaluateContext().evaluate("a.length", Collections.<String, EvaluateContextAdditionalParameter>singletonMap("a", value), false)
|
||||
context.getEvaluateContext().evaluate("a.length", Collections.<String, Object>singletonMap("a", value), false)
|
||||
.done(new Consumer<EvaluateResult>() {
|
||||
@Override
|
||||
public void consume(EvaluateResult result) {
|
||||
|
||||
Reference in New Issue
Block a user