Example usage for com.google.common.css.compiler.ast CssDeclarationNode CssDeclarationNode

List of usage examples for com.google.common.css.compiler.ast CssDeclarationNode CssDeclarationNode

Introduction

In this page you can find the example usage for com.google.common.css.compiler.ast CssDeclarationNode CssDeclarationNode.

Prototype

public CssDeclarationNode(CssPropertyNode propertyName, CssPropertyValueNode propertyValue) 

Source Link

Document

Constructor of a node representing a CSS declaration.

Usage

From source file:com.google.gwt.resources.gss.ImageSpriteCreator.java

private CssDeclarationNode createDeclarationNode(CssPropertyNode propertyNode,
        CssPropertyValueNode propertyValueNode, SourceCodeLocation location, boolean useAlternate) {
    CssDeclarationNode replaceNode = new CssDeclarationNode(propertyNode, propertyValueNode);
    replaceNode.setSourceCodeLocation(location);

    if (useAlternate) {
        replaceNode.setComments(ImmutableList.of(new CssCommentNode(ALTERNATE, location)));
    }/*from www.  j  a  v  a 2s  . c o  m*/

    return replaceNode;
}