com.google.gwt.core.ext.Generator Java Examples

The following examples show how to use com.google.gwt.core.ext.Generator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CssDotPathNode.java    From gss.gwt with Apache License 2.0 6 votes vote down vote up
public static String resolveExpression(String instance, String path, String prefix, String suffix) {
  String expression = path.replace(".", "().") + "()";

  if (!Strings.isNullOrEmpty(instance)) {
    expression = instance + "." + expression;
  }

  if (!Strings.isNullOrEmpty(prefix)) {
    expression = "\"" + Generator.escape(prefix) + "\" + " + expression;
  }

  if (!Strings.isNullOrEmpty(suffix)) {
    expression += " + \"" + Generator.escape(suffix) + "\"";
  }

  return expression;
}
 
Example #2
Source File: CssPrinter.java    From gss.gwt with Apache License 2.0 5 votes vote down vote up
/**
 * Read what the internal StringBuilder used by the CompactPrinter has already built. Escape it.
 * and reset the internal StringBuilder
 * @return
 */
private String flushInternalStringBuilder() {
  String content = "\"" + Generator.escape(sb.toString()) + "\"";
  sb = new StringBuilder();

  return content;
}
 
Example #3
Source File: SimpleValue.java    From gss.gwt with Apache License 2.0 4 votes vote down vote up
@Override
public String toCss() {
  return Generator.escape(value);
}