@Override protected String consumePlaceholderInnards(XMLElement elem) throws UnableToCompleteException { return elem.consumeInnerTextEscapedAsHtmlStringLiteral(new NullInterpreter<String>()); } }
public void parse(XMLElement elem, String fieldName, JClassType type, UiBinderWriter writer) throws UnableToCompleteException { // Widgets that implement HasText will use their elements' inner text. String text = elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer)); if (text.trim().length() > 0) { writer.genStringPropertySet(fieldName, "text", text); } } }
/** * Consumes all child text nodes, and asserts that this element held only * text. Trailing and leading whitespace is trimmed, and escaped for use as a * string literal. Notice that HTML entities in the text are NOT escaped * <p> * This call requires an interpreter to make sense of any special children. * The odds are you want to use * {@link com.google.gwt.uibinder.elementparsers.TextInterpreter} * * @throws UnableToCompleteException If any elements present are not consumed * by the interpreter */ public String consumeInnerTextEscapedAsStringLiteral(Interpreter<String> interpreter) throws UnableToCompleteException { return consumeInnerTextEscapedAsHtmlStringLiteral(interpreter, false); }
/** * Consumes all child text nodes, and asserts that this element held only * text. Trailing and leading whitespace is trimmed, and escaped for use as a * string literal. Notice that HTML entities in the text are also escaped * <p> * This call requires an interpreter to make sense of any special children. * The odds are you want to use * {@link com.google.gwt.uibinder.elementparsers.TextInterpreter} * * @throws UnableToCompleteException If any elements present are not consumed * by the interpreter */ public String consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter<String> interpreter) throws UnableToCompleteException { return consumeInnerTextEscapedAsHtmlStringLiteral(interpreter, true); }
/** * Consumes all child text nodes, and asserts that this element held only * text. Trailing and leading whitespace is trimmed, and escaped for use as a * string literal. Notice that HTML entities in the text are also escaped * <p> * This call requires an interpreter to make sense of any special children. * The odds are you want to use * {@link com.google.gwt.uibinder.elementparsers.TextInterpreter} * * @throws UnableToCompleteException If any elements present are not consumed * by the interpreter */ public String consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter<String> interpreter) throws UnableToCompleteException { return consumeInnerTextEscapedAsHtmlStringLiteral(interpreter, true); }
/** * Consumes all child text nodes, and asserts that this element held only * text. Trailing and leading whitespace is trimmed, and escaped for use as a * string literal. Notice that HTML entities in the text are NOT escaped * <p> * This call requires an interpreter to make sense of any special children. * The odds are you want to use * {@link com.google.gwt.uibinder.elementparsers.TextInterpreter} * * @throws UnableToCompleteException If any elements present are not consumed * by the interpreter */ public String consumeInnerTextEscapedAsStringLiteral(Interpreter<String> interpreter) throws UnableToCompleteException { return consumeInnerTextEscapedAsHtmlStringLiteral(interpreter, false); }
String openImage = children.header.consumeImageResourceAttribute(OPEN_IMAGE); String closedImage = children.header.consumeImageResourceAttribute(CLOSED_IMAGE); String headerText = children.header.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter( writer));
/** * Refines {@link #consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter)} to * handle PostProcessingInterpreter. */ public String consumeInnerText(PostProcessingInterpreter<String> interpreter) throws UnableToCompleteException { String text = consumeInnerTextEscapedAsHtmlStringLiteral(interpreter); return interpreter.postProcess(text); }
/** * Refines {@link #consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter)} to * handle PostProcessingInterpreter. */ public String consumeInnerText(PostProcessingInterpreter<String> interpreter) throws UnableToCompleteException { String text = consumeInnerTextEscapedAsHtmlStringLiteral(interpreter); return interpreter.postProcess(text); }
@Override protected String consumePlaceholderInnards(XMLElement elem) throws UnableToCompleteException { return elem.consumeInnerTextEscapedAsHtmlStringLiteral(new NullInterpreter<String>()); } }
@Override protected String consumePlaceholderInnards(XMLElement elem) throws UnableToCompleteException { return elem.consumeInnerTextEscapedAsHtmlStringLiteral(new NullInterpreter<String>()); } }
/** * Refines {@link #consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter)} to * handle PostProcessingInterpreter. */ public String consumeInnerText(PostProcessingInterpreter<String> interpreter) throws UnableToCompleteException { String text = consumeInnerTextEscapedAsHtmlStringLiteral(interpreter); return interpreter.postProcess(text); }
/** * Refines {@link #consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter)} to * handle PostProcessingInterpreter. */ public String consumeInnerText(PostProcessingInterpreter<String> interpreter) throws UnableToCompleteException { String text = consumeInnerTextEscapedAsHtmlStringLiteral(interpreter); return interpreter.postProcess(text); }
public void parse(XMLElement elem, String fieldName, JClassType type, UiBinderWriter writer) throws UnableToCompleteException { // Widgets that implement HasText will use their elements' inner text. String text = elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer)); if (text.trim().length() > 0) { writer.genStringPropertySet(fieldName, "text", text); } } }
/** * Require that the receiver's body is empty of text. * * @throws UnableToCompleteException if it isn't */ public void assertNoText() throws UnableToCompleteException { SimpleInterpeter<String> nullInterpreter = new SimpleInterpeter<String>(null); String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter); if (!"".equals(s)) { logger.die(this, "Unexpected text in element: \"%s\"", s); } }
public void parse(XMLElement elem, String fieldName, JClassType type, UiBinderWriter writer) throws UnableToCompleteException { // Widgets that implement HasText will use their elements' inner text. String text = elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer)); if (text.trim().length() > 0) { writer.genStringPropertySet(fieldName, "text", text); } } }
/** * Require that the receiver's body is empty of text. * * @throws UnableToCompleteException if it isn't */ public void assertNoText() throws UnableToCompleteException { SimpleInterpeter<String> nullInterpreter = new SimpleInterpeter<String>(null); String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter); if (!"".equals(s)) { logger.die(this, "Unexpected text in element: \"%s\"", s); } }
/** * Require that the receiver's body is empty of text. * * @throws UnableToCompleteException if it isn't */ public void assertNoText() throws UnableToCompleteException { SimpleInterpeter<String> nullInterpreter = new SimpleInterpeter<String>(null); String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter); if (!"".equals(s)) { logger.die(this, "Unexpected text in element: \"%s\"", s); } }
/** * Require that the receiver's body is empty of text. * * @throws UnableToCompleteException if it isn't */ public void assertNoText() throws UnableToCompleteException { SimpleInterpeter<String> nullInterpreter = new SimpleInterpeter<String>(null); String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter); if (!"".equals(s)) { logger.die(this, "Unexpected text in element: \"%s\"", s); } }
private String parseChildElement(XMLElement elem, JClassType valueType, UiBinderWriter writer) throws UnableToCompleteException { if ("value".equals(elem.getLocalName())) { return String.format("\"%s\"", elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer))); } else if ("item".equals(elem.getLocalName())) { return elem.consumeRequiredAttribute("value", valueType); } writer.die(elem, "Unknown child element of SimpleComboBox"); return null; // will never get here } }