Examples of newValue()


Examples of org.apache.xmlbeans.SchemaType.newValue()

                {
                    String stringrep = list.get(i).toString();
                    if (contains_white_space(stringrep))
                        throw new XmlValueOutOfRangeException();
                }
                newval[i] = itemType.newValue(entry);
            }
            xList = new XmlSimpleList(Arrays.asList(newval));
        }
        finally
        {
View Full Code Here

Examples of org.chromium.sdk.internal.v8native.protocol.input.SetVariableValueBody.newValue()

          try {
            body = successResponse.body().asSetVariableValueBody();
          } catch (JsonProtocolParseException e) {
            throw new RuntimeException(e);
          }
          ValueHandle newValueHandle = body.newValue();
          ValueLoaderImpl valueLoader = internalContext.getValueLoader();
          ValueMirror mirror = valueLoader.addDataToMap(newValueHandle);
          JsValueBase value = JsVariableBase.createValue(valueLoader, mirror);
          callback.success(value);
        }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.dataset.generator.IValueGenerator.newValue()

                field.setAccessible(true);
                try {
                    Class<? extends IValueGenerator> generatorClass = field
                            .getAnnotation(DataValueGenerator.class).value();
                    IValueGenerator generator = generatorClass.newInstance();
                    Object newValue = generator.newValue(random);
                    // System.out.println("newValue: "+newValue + "\t" +
                    // generator.getClass().getName());
                    assertNotNull(newValue);
                } catch (InstantiationException e) {
                    e.printStackTrace();
View Full Code Here

Examples of org.eclipse.xtext.xbase.interpreter.IEvaluationContext.newValue()

        if ((executable instanceof Executable)) {
          Object _xblockexpression_1 = null;
          {
            final IEvaluationContext context = this.createContext();
            QualifiedName _create = QualifiedName.create("this");
            context.newValue(_create, this.tortoise);
            int index = 0;
            EList<JvmFormalParameter> _parameters = operation.getParameters();
            for (final JvmFormalParameter param : _parameters) {
              {
                String _name = param.getName();
View Full Code Here

Examples of org.eclipse.xtext.xbase.interpreter.IEvaluationContext.newValue()

            for (final JvmFormalParameter param : _parameters) {
              {
                String _name = param.getName();
                QualifiedName _create_1 = QualifiedName.create(_name);
                Object _get = argumentValues.get(index);
                context.newValue(_create_1, _get);
                index = (index + 1);
              }
            }
            XBlockExpression _body = ((Executable)executable).getBody();
            final IEvaluationResult result = this.evaluate(_body, context, CancelIndicator.NullImpl);
View Full Code Here

Examples of org.eclipse.xtext.xbase.interpreter.IEvaluationContext.newValue()

    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();
View Full Code Here

Examples of org.eclipse.xtext.xbase.interpreter.IEvaluationContext.newValue()

  }

  private String interpret(final Model m, final IProgressMonitor monitor) {
    final List<String> data = new ArrayList<String>();
    IEvaluationContext context = new DefaultEvaluationContext();
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.INDEX), resourceDescriptions);
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.RESOURCESET), resourceSetProvider.get());
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.INJECTOR), injector);
    for (XImportDeclaration i : m.getImports().getImportDeclarations()) {
      data.add(serializer.serialize(i).trim());
    }
View Full Code Here

Examples of org.eclipse.xtext.xbase.interpreter.IEvaluationContext.newValue()

  private String interpret(final Model m, final IProgressMonitor monitor) {
    final List<String> data = new ArrayList<String>();
    IEvaluationContext context = new DefaultEvaluationContext();
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.INDEX), resourceDescriptions);
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.RESOURCESET), resourceSetProvider.get());
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.INJECTOR), injector);
    for (XImportDeclaration i : m.getImports().getImportDeclarations()) {
      data.add(serializer.serialize(i).trim());
    }
    for (XMethodDeclaration d : m.getMethods()) {
View Full Code Here

Examples of org.eclipse.xtext.xbase.interpreter.IEvaluationContext.newValue()

  private String interpret(final Model m, final IProgressMonitor monitor) {
    final List<String> data = new ArrayList<String>();
    IEvaluationContext context = new DefaultEvaluationContext();
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.INDEX), resourceDescriptions);
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.RESOURCESET), resourceSetProvider.get());
    context.newValue(qualifiedNameConverter.toQualifiedName(IModelQueryConstants.INFERRED_CLASS_NAME + "." + IModelQueryConstants.INJECTOR), injector);
    for (XImportDeclaration i : m.getImports().getImportDeclarations()) {
      data.add(serializer.serialize(i).trim());
    }
    for (XMethodDeclaration d : m.getMethods()) {
      data.add(serializer.serialize(d).trim());
View Full Code Here

Examples of org.eclipse.xtext.xbase.interpreter.IEvaluationContext.newValue()

      for(XExpression expr : ruleModel.getVariables()) {
        if (expr instanceof XVariableDeclaration) {
        XVariableDeclaration var = (XVariableDeclaration) expr;
        try {
            Object initialValue = var.getRight()==null ? null : scriptEngine.newScriptFromXExpression(var.getRight()).execute();
          evaluationContext.newValue(QualifiedName.create(var.getName()), initialValue);
        } catch (ScriptExecutionException e) {
          logger.warn("Variable '{}' on rule file '{}' cannot be initialized with value '{}': {}",
              new String[] { var.getName(), ruleModel.eResource().getURI().path(), var.getRight().toString(), e.getMessage() });
        }
      }
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.