Package com.puppetlabs.geppetto.pp

Examples of com.puppetlabs.geppetto.pp.Expression


      else if(/* ruleDQT_DOLLAR == rule || ruleDQT_QUOTE == rule || */ruleDQ_STRING == rule)
        acceptor.addPosition(o.getOffset(), o.getLength(), PPHighlightConfiguration.TEMPLATE_TEXT_ID);
      else if(ruleExpression == rule) {
        EObject semantic = o.getSemanticElement();
        if(semantic instanceof ExpressionTE) {
          Expression expr = ((ExpressionTE) semantic).getExpression();
          expr = ((ParenthesisedExpression) expr).getExpr();
          if(expr instanceof LiteralNameOrReference)
            acceptor.addPosition(
              o.getOffset(), ((LiteralNameOrReference) expr).getValue().length() + 3,
              PPHighlightConfiguration.VARIABLE_ID);
View Full Code Here


      if(counter < 1)
        highlightObject(resourceExpr, PPHighlightConfiguration.RESOURCE_REF_ID, acceptor);
    }
    for(ResourceBody body : expr.getResourceData()) {
      if(body.getNameExpr() != null) {
        Expression nameExpr = body.getNameExpr();
        ICompositeNode node = NodeModelUtils.getNode(nameExpr);
        int offset = node.getOffset();
        int length = node.getLength();
        // if the name is a list of names, skip the opening and closing brackets
        if(nameExpr instanceof LiteralList) {
View Full Code Here

        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

   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetMethodExpr(Expression newMethodExpr, NotificationChain msgs) {
    Expression oldMethodExpr = methodExpr;
    methodExpr = newMethodExpr;
    if(eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(
        this, Notification.SET, PPPackage.METHOD_CALL__METHOD_EXPR, oldMethodExpr, newMethodExpr);
      if(msgs == null)
View Full Code Here

   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetParentName(Expression newParentName, NotificationChain msgs) {
    Expression oldParentName = parentName;
    parentName = newParentName;
    if(eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(
        this, Notification.SET, PPPackage.NODE_DEFINITION__PARENT_NAME, oldParentName, newParentName);
      if(msgs == null)
View Full Code Here

   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetExpr(Expression newExpr, NotificationChain msgs) {
    Expression oldExpr = expr;
    expr = newExpr;
    if(eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(
        this, Notification.SET, PPPackage.PARENTHESISED_EXPRESSION__EXPR, oldExpr, newExpr);
      if(msgs == null)
View Full Code Here

   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetResourceExpr(Expression newResourceExpr, NotificationChain msgs) {
    Expression oldResourceExpr = resourceExpr;
    resourceExpr = newResourceExpr;
    if(eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(
        this, Notification.SET, PPPackage.RESOURCE_EXPRESSION__RESOURCE_EXPR, oldResourceExpr, newResourceExpr);
      if(msgs == null)
View Full Code Here

   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetSwitchExpr(Expression newSwitchExpr, NotificationChain msgs) {
    Expression oldSwitchExpr = switchExpr;
    switchExpr = newSwitchExpr;
    if(eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(
        this, Notification.SET, PPPackage.CASE_EXPRESSION__SWITCH_EXPR, oldSwitchExpr, newSwitchExpr);
      if(msgs == null)
View Full Code Here

   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetClassReference(Expression newClassReference, NotificationChain msgs) {
    Expression oldClassReference = classReference;
    classReference = newClassReference;
    if(eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(
        this, Notification.SET, PPPackage.COLLECT_EXPRESSION__CLASS_REFERENCE, oldClassReference,
        newClassReference);
View Full Code Here

   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetValue(Expression newValue, NotificationChain msgs) {
    Expression oldValue = value;
    value = newValue;
    if(eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(
        this, Notification.SET, PPPackage.DEFINITION_ARGUMENT__VALUE, oldValue, newValue);
      if(msgs == null)
View Full Code Here

TOP

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

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.