use of com.sun.jdi.IntegerValue in project gravel by gravel-st.
the class VMTargetRemoteTest method testEvaluate.
@Test
public void testEvaluate() throws Throwable {
ObjectReference promise = remote.evaluateForked("3+4");
ThreadReference thread = ((ThreadReference) remote.invokeMethod(promise, "thread"));
Value result1 = remote.invokeMethod(promise, "result");
Value ex = remote.invokeMethod(promise, "throwable");
printThreadState();
VMTargetStarter.sleep(100);
printThreadState();
boolean isFinished = ((BooleanValue) remote.invokeMethod(promise, "isFinished")).booleanValue();
assertTrue(isFinished);
ObjectReference result = (ObjectReference) remote.invokeMethod(promise, "result");
IntegerValue intValue = (IntegerValue) remote.invokeMethod(result, "intValue");
assertEquals(7, intValue.intValue());
}
use of com.sun.jdi.IntegerValue in project android by JetBrains.
the class ResolveTypedIntegerCommand method action.
@Override
public void action() {
// TODO: see if it is possible to cache this evaluation
// if (myIsEvaluated) return;
DebugProcess debugProcess = myEvaluationContext.getDebugProcess();
if (!(debugProcess instanceof DebugProcessImpl)) {
return;
}
final DebuggerContextImpl debuggerContext = ((DebugProcessImpl) debugProcess).getDebuggerContext();
PsiAnnotation annotation = ApplicationManager.getApplication().runReadAction(new Computable<PsiAnnotation>() {
@Override
public PsiAnnotation compute() {
try {
return getAnnotation(debuggerContext);
} catch (IndexNotReadyException e) {
return null;
}
}
});
if (annotation != null) {
ResourceIdResolver resolver = ServiceManager.getService(myEvaluationContext.getProject(), ResourceIdResolver.class);
DynamicResourceIdResolver resolver1 = new DynamicResourceIdResolver(myEvaluationContext, resolver);
myResult = AnnotationsRenderer.render(resolver1, annotation, ((IntegerValue) myValue).value());
}
evaluationResult("");
}
Aggregations