IEvaluator evaluator = (IEvaluator) Platform
.getAdapterManager().getAdapter(constructor,
IEvaluator.class);
if (evaluator != null) {
int result = evaluator.evaluate(context);
FrameContext consFrame = context.popup();
if (result == IEvaluator.RETURN) {
System.out.println("this="
+ context.getThisObject());
for (String fieldName : context.getFieldNames()) {
System.out.println(fieldName + "="
+ context.getField(fieldName));
}
} else if (result == IEvaluator.THROW) {
Throwable throwable = (Throwable) consFrame.getResult();
throwable.printStackTrace();
}
return Status.OK_STATUS;
}
}