Examples of PlaceHolder


Examples of com.alibaba.citrus.util.templatelite.Template.Placeholder

    @Test
    public void test02_placeholder_template() throws Exception {
        loadTemplate("test02_placeholder_template.txt", 2, 2, 0);

        Placeholder placeholder = (Placeholder) template.nodes[0];

        assertPlaceholder(placeholder, "for", "Line 1 Column 1", new String[] { "#aaa", "#bbb.ccc", "ccc" },
                          "#aaa, #bbb.ccc, ccc");

        PlaceholderParameter param;
View Full Code Here

Examples of com.alibaba.citrus.util.templatelite.Template.Placeholder

    @Test
    public void test02_placeholder_template_group() throws Exception {
        loadTemplate("test02_placeholder_template_group.txt", 1, 1, 1);

        Placeholder placeholder = (Placeholder) template.nodes[0];

        // 子模板的顺序和模板文件中的一致
        assertPlaceholder(placeholder, "for", "Line 3 Column 1", new String[] { "#aaa.d", "#aaa.c", "#aaa.b", "ccc" },
                          "#aaa.*, ccc");

View Full Code Here

Examples of com.alibaba.citrus.util.templatelite.Template.Placeholder

    @Test
    public void test02_placeholder_template_group_2() throws Exception {
        loadTemplate("test02_placeholder_template_group_2.txt", 0, 1, 1);

        Placeholder placeholder = (Placeholder) template.getSubTemplate("aaa").nodes[0];

        // 子模板的顺序和模板文件中的一致
        assertPlaceholder(placeholder, "for", "Line 4 Column 3", new String[] { "#d", "#c", "#b", "ccc" }, "#*, ccc");

        PlaceholderParameter param;
View Full Code Here

Examples of com.alibaba.citrus.util.templatelite.Template.Placeholder

    private void assertPlaceholder(Node node, String name, String location) {
        assertPlaceholder(node, name, location, new String[0], null);
    }

    private void assertPlaceholder(Node node, String name, String location, String[] params, String paramsString) {
        Placeholder placeholder = (Placeholder) node;

        assertEquals(name, placeholder.name);
        assertEquals(paramsString, placeholder.paramsString);
        assertLocation(placeholder.location, location);

        if (isEmptyArray(params)) {
            assertEquals(0, placeholder.params.length);
        } else {
            assertEquals(params.length, placeholder.params.length);

            for (int i = 0; i < params.length; i++) {
                assertEquals(params[i], placeholder.params[i].getValue());
            }
        }

        String str = placeholder.toString();

        if (paramsString == null) {
            assertThat(str, startsWith("${" + name + "}"));
        } else {
            assertThat(str, startsWith("${" + name + ":" + paramsString + "}"));
View Full Code Here

Examples of com.google.transconsole.common.messages.Placeholder

        if (phIter.hasNext()) {
          sb.append(", {");
          appendLine(msg.getSourcePosition(), sb);
          sb = new StringBuilder();
          while(phIter.hasNext()) {
            Placeholder placeholder = phIter.next();
            sb.append(JAVASCRIPT.toStringLiteral(toLowerCamelCase(placeholder.getPresentation())));
            sb.append(": ");
            sb.append(evalPlaceholder(placeholder.getOriginal(), paramVar));
            if (phIter.hasNext()) {
              sb.append(",");
            }
            appendLine(msg.getSourcePosition(), sb);
            sb = new StringBuilder();
View Full Code Here

Examples of com.volantis.xml.sax.recorder.impl.recording.PlaceHolder

        this.attributeBuilder = new AttributeContainerBuilderImpl(stringTable);
        this.balancingEventPositionReferences = new Stack();
        recordingInProgress = true;
        prefixMappingLocations = new Stack();

        lastCharacterEventLength = new PlaceHolder(this);
        prefixMappingCountReference = new PlaceHolder(this);
    }
View Full Code Here

Examples of com.volantis.xml.sax.recorder.impl.recording.PlaceHolder

     */
    private void addPlaceHolderValue(PlaceHolderList list, int initialValue) {
        // Create the place holder here as it automatically picks up the
        // current position which will be changed by the addInt() method that
        // follows.
        PlaceHolder placeHolder = new PlaceHolder(this);

        // Add a dummy value.
        addInt(initialValue);

        if (LOGGER.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.poi.xslf.usermodel.Placeholder

    private void extractContent(XSLFShape[] shapes, boolean skipPlaceholders, XHTMLContentHandler xhtml, String slideDesc)
            throws SAXException {
        for (XSLFShape sh : shapes) {
            if (sh instanceof XSLFTextShape) {
                XSLFTextShape txt = (XSLFTextShape) sh;
                Placeholder ph = txt.getTextType();
                if (skipPlaceholders && ph != null) {
                    continue;
                }
                xhtml.element("p", txt.getText());
            } else if (sh instanceof XSLFGroupShape){
View Full Code Here

Examples of org.apache.poi.xslf.usermodel.Placeholder

    private void extractContent(XSLFShape[] shapes, boolean skipPlaceholders, XHTMLContentHandler xhtml)
            throws SAXException {
        for (XSLFShape sh : shapes) {
            if (sh instanceof XSLFTextShape) {
                XSLFTextShape txt = (XSLFTextShape) sh;
                Placeholder ph = txt.getTextType();
                if (skipPlaceholders && ph != null) {
                    continue;
                }
                xhtml.element("p", txt.getText());
            } else if (sh instanceof XSLFGroupShape){
View Full Code Here

Examples of org.apache.ws.jaxme.js.PlaceHolder

    JavaMethod jm = pSource.getMethod("startElement", new JavaQName[]{STRING_TYPE, STRING_TYPE, STRING_TYPE,
                                                                      ATTRIBUTES_TYPE});
    if (jm == null) {
      throw new IllegalStateException("No such method: 'startElement' in '" + pSource.getQName() + "'.");
    }
    PlaceHolder placeHolder = jm.getPlaceHolder("GroupSG");
    if (placeHolder == null) {
      throw new IllegalStateException("No such placeholder: 'GroupSG' in method 'startElement'");
    }
    placeHolder.remove();
    Parameter[] parameters = jm.getParams();
    Parameter pNamespaceURI = parameters[0];
    Parameter pLocalName = parameters[1];
    Parameter pQName = parameters[2];
    Parameter pAttr = parameters[3];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.