Examples of XMethodDeclaration


Examples of org.eclipse.xtext.mqrepl.modelQueryLanguage.XMethodDeclaration

  @Inject
  IJvmModelAssociations jvmModelAssociations;

  @Override
  protected Object invokeOperation(JvmOperation operation, Object receiver, List<Object> argumentValues, IEvaluationContext c, CancelIndicator indicator) {
    XMethodDeclaration m = getMethodDeclaration(operation);
    if (m != null) {
      IEvaluationContext context = c.fork();
      int index = 0;
      for (JvmFormalParameter p : m.getParameters()) {
        context.newValue(QualifiedName.create(p.getName()), argumentValues.get(index));
        index++;
      }
      IEvaluationResult result = evaluate(m.getBody(), context, indicator);
      if (result.getException() != null) {
        result.getException().printStackTrace();
        throw new EvaluationException(result.getException());
      }
      return result.getResult();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.