Package com.google.gxp.compiler.base

Examples of com.google.gxp.compiler.base.Conditional


        sgmlDoctype = new ExceptionExpression(
            element.getSourcePosition(), elementSchema,
            ExceptionExpression.Kind.NOT_SUPPORTED_IN_SGML_MODE,
            exceptionMessage);
      }
      return new Conditional(element, elementSchema,
                             new IsXmlExpression(element, elementSchema),
                             xmlDoctype, sgmlDoctype);
    }
View Full Code Here


      }
      concatList.add(new StringConstant(element, elementSchema, "=\""));
      concatList.add(new StringConstant(element, elementSchema,
          CharEscapers.xmlEscaper().escape(xmlns)));
      concatList.add(new StringConstant(element, elementSchema, "\""));
      return new Conditional(
          element, elementSchema,
          new IsXmlExpression(element, elementSchema),
          Concatenation.create(element.getSourcePosition(), elementSchema,
                               concatList),
          new StringConstant(element, elementSchema, ""));
View Full Code Here

          } else {
            if (attrValue instanceof ConvertibleToContent) {
              ConvertibleToContent ctc = (ConvertibleToContent)attrValue;
              attrValue = ctc.getSubexpression();
            }
            values.add(new Conditional(element, elementSchema,
                                       attrValue,
                                       buildBooleanAttrExpression(attr, element),
                                       empty));
          }
        } else {
          Expression condition = attr.getCondition();
          if (condition != null) {
            values.add(new Conditional(element, elementSchema, condition,
                                       buildAttrExpression(attr, element), empty));
          } else {
            values.add(buildAttrExpression(attr, element));
          }
        }
      }

      for (String attrBundle : element.getAttrBundles()) {
        values.add(new EscapeExpression(elementSchema,
                                        new AttrBundleReference(element, attrBundle)));
      }

      if (elementValidator.isFlagSet(ElementValidator.Flag.NOENDTAG)) {
        values.add(new Conditional(
            element, elementSchema,
            new IsXmlExpression(element, elementSchema),
            new StringConstant(element, elementSchema, " /"),
            new StringConstant(element, elementSchema, "")));
      }
View Full Code Here

    private Expression buildBooleanAttrExpression(Attribute attr, OutputElement element) {
      Schema elementSchema = element.getSchema();
      List<Expression> values = Lists.newArrayList();

      values.add(new StringConstant(attr, elementSchema," " + attr.getName()));
      values.add(new Conditional(
                     attr, elementSchema,
                     new IsXmlExpression(attr, elementSchema),
                     new StringConstant(attr, elementSchema,
                                        "=\"" + attr.getName() + "\""),
                     new StringConstant(attr, elementSchema, "")));
View Full Code Here

      if (clauses.isEmpty()) {
        if (elseExpression == null) {
          alertSink.add(new NoClausesInCondError(node));
        }
      } else {
        output.accumulate(new Conditional(node, null, clauses,
                                          elseExpression));
      }

      return null;
    }
View Full Code Here

      if (clauses.isEmpty()) {
        if (elseExpression == null) {
          alertSink.add(new NoClausesInCondError(node));
        }
      } else {
        output.accumulate(new Conditional(node, null, clauses,
                                          elseExpression));
      }

      return null;
    }
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.base.Conditional

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.