List of usage examples for org.eclipse.jdt.core.dom SuperMethodInvocation getRoot
public final ASTNode getRoot()
From source file:org.eclipse.wb.internal.core.eval.evaluators.InvocationEvaluator.java
License:Open Source License
private Object evaluate(EvaluationContext context, SuperMethodInvocation invocation) throws Exception { // prepare target Object thisValue = AstEvaluationEngine.evaluate(context, null); // prepare method Method method;/* www . j a va 2 s . c om*/ { IMethodBinding methodBinding = AstNodeUtils.getMethodBinding(invocation); Assert.isNotNull(methodBinding); method = getReflectionMethod(thisValue.getClass(), methodBinding); } // prepare argument values Object[] argumentValues = getArgumentValues(context, DomGenerics.arguments(invocation), true); // invoke method try { invocation.getRoot().setProperty(SUPER_MI_KEY, Boolean.TRUE); return method.invoke(thisValue, argumentValues); } catch (Throwable e) { throw new DesignerException(ICoreExceptionConstants.EVAL_SUPER_METHOD, e, context.getSource(invocation), method.toString(), getArguments_toString(argumentValues), AstEvaluationEngine.getUserStackTrace(e)); } }