Package com.puppetlabs.geppetto.pp

Examples of com.puppetlabs.geppetto.pp.DefinitionArgument


        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
      case PPPackage.DEFINITION_ARGUMENT: {
        DefinitionArgument definitionArgument = (DefinitionArgument) theEObject;
        T result = caseDefinitionArgument(definitionArgument);
        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
View Full Code Here


          if(name.equals(vname))
            return EObjectDescription.create(name, lhs);
        }
      }
      else if(o instanceof DefinitionArgument) {
        DefinitionArgument arg = (DefinitionArgument) o;
        String argName = arg.getArgName();
        if(argName.startsWith("$") && name.equals(argName.substring(1)) || name.equals(argName))
          return EObjectDescription.create(name, o);
      }
      else if(o instanceof Lambda) {
        itor.prune(); // do not visit nested Lambdas
View Full Code Here

      if(argCount > 0)
        data.put(PPDSLConstants.CLASS_ARG_COUNT, Integer.toString(argCount));
      return data;
    }
    else if(eObject.eClass() == PPPackage.Literals.DEFINITION_ARGUMENT) {
      DefinitionArgument arg = (DefinitionArgument) eObject;
      Expression e = arg.getValue();
      if(e != null) {
        ICompositeNode n = NodeModelUtils.getNode(e);
        Map<String, String> data = Maps.newHashMapWithExpectedSize(1);
        data.put(PPDSLConstants.DEFAULT_EXPRESSION_DATA, n.getText());
        return data;
View Full Code Here

        // }
        else if(ge == grammarAccess.getDefinitionArgumentAccess().getOpEqualsSignGreaterThanSignKeyword_1_0_1_0() ||
            ge == grammarAccess.getDefinitionArgumentAccess().getOpEqualsSignKeyword_1_0_0_0()) {
          EObject semantic = n.getParent().getSemanticObject();
          if(semantic != null && semantic instanceof DefinitionArgument) {
            DefinitionArgument da = (DefinitionArgument) semantic;
            int length = da.getArgName() == null
                ? 0
                : da.getArgName().length();
            operatorNodes.put(n, length);
            cluster.add(length);
          }
        }
      }
View Full Code Here

      counter++;
    }
    if(o.eContainer() instanceof Lambda) {
      int limit = arguments.size();
      for(int i = 0; i < limit; i++) {
        DefinitionArgument arg = arguments.get(i);
        if(arg.getValue() == null)
          continue;
        if(i < lastWithoutDefault)
          acceptor.acceptError(
            "A Lambda parameter with default can not appear before a parameter without default", arg,
            IPPDiagnostics.ISSUE__PARAM_DEFAULT_NOT_LAST);
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.pp.DefinitionArgument

Copyright © 2018 www.massapicom. 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.