Package com.google.gwt.thirdparty.common.css.compiler.ast

Examples of com.google.gwt.thirdparty.common.css.compiler.ast.CssFunctionArgumentsNode


      SourceCodeLocation location) {
    // build the url function
    CssFunctionNode urlFunction = new CssFunctionNode(Function.byName("url"), location);
    CssDotPathNode imageUrl = new CssDotPathNode(resourceThisPrefix, imageResource + ".getSafeUri" +
        ".asString", null, null, location);
    CssFunctionArgumentsNode urlFunctionArguments = new CssFunctionArgumentsNode();
    urlFunctionArguments.addChildToBack(imageUrl);
    urlFunction.setArguments(urlFunctionArguments);

    // build left offset
    CssDotPathNode left = new CssDotPathNode(resourceThisPrefix, imageResource + ".getLeft", "-",
        "px", location);
View Full Code Here


  }

  private CssFunctionNode buildUrlNode(String javaExpression, SourceCodeLocation location) {
    CssFunctionNode urlNode = GssFunctions.createUrlNode("", location);
    CssJavaExpressionNode cssJavaExpressionNode = new CssJavaExpressionNode(javaExpression);
    CssFunctionArgumentsNode arguments =
        new CssFunctionArgumentsNode(ImmutableList.<CssValueNode>of(cssJavaExpressionNode));
    urlNode.setArguments(arguments);

    return urlNode;
  }
View Full Code Here

  private void assertResultIsValid(List<CssValueNode> result, String expectedJavaExpression) {
    assertEquals(1, result.size());
    assertTrue(result.get(0) instanceof CssFunctionNode);

    CssFunctionArgumentsNode arguments = ((CssFunctionNode) result.get(0)).getArguments();
    assertEquals(1, arguments.numChildren());
    assertTrue(arguments.getChildAt(0) instanceof CssJavaExpressionNode);

    CssJavaExpressionNode javaExpressionNode = (CssJavaExpressionNode) arguments.getChildAt(0);
    assertEquals(expectedJavaExpression, javaExpressionNode.getValue());

    verify(errorManager, never()).report(any(GssError.class));
    verify(errorManager, never()).reportWarning(any(GssError.class));
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.thirdparty.common.css.compiler.ast.CssFunctionArgumentsNode

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.