Package org.auraframework.impl.util

Examples of org.auraframework.impl.util.TextTokenizer


                    // more information there, or we successfully finished, in which
                    // case it is rather unclear how this could happen.
                }
            }

            TextTokenizer tt = TextTokenizer.tokenize(contents, getLocation());
            tt.addExpressionRefs(this);

            return createDefinition(map);
        } catch (QuickFixException qfe) {
            return createDefinition(qfe);
        } catch (JsonParseException pe) {
View Full Code Here


    @Override
    protected AttributeDefRefImpl createDefinition() throws QuickFixException {
        if (AuraTextUtil.isNullEmptyOrWhitespace(stringValue)) {
            builder.setValue(children);
        } else {
            TextTokenizer tt = TextTokenizer.tokenize(stringValue, getLocation());
            builder.setValue(tt.asValue(getParentHandler()));
        }

        return builder.build();
    }
View Full Code Here

        builder.setDescription(getAttributeValue(ATTRIBUTE_DESCRIPTION));
    }

    @Override
    protected VarDef createDefinition() throws QuickFixException {
        TextTokenizer tt = TextTokenizer.tokenize(value, getLocation());
        builder.setValue(tt.asValue(getParentHandler()));
        return builder.build();
    }
View Full Code Here

        Object defaultObj = null;
        if (defaultValue != null) { // even it is an empty string or whitespace,
            // we should still set it in order to
            // distinguish from the case the default
            // value is not set at all.
            TextTokenizer tt = TextTokenizer.tokenize(defaultValue, getLocation());
            defaultObj = tt.asValue(getParentHandler());
        } else if (!body.isEmpty()) {
            defaultObj = body;
        }

        if (defaultObj != null) {
View Full Code Here

        String text = xmlReader.getText();
        boolean skip = getWhitespaceBehavior() == WhitespaceBehavior.OPTIMIZE ? AuraTextUtil
                .isNullEmptyOrWhitespace(text) : AuraTextUtil
                .isNullOrEmpty(text);
        if (!skip) {
            TextTokenizer tokenizer = TextTokenizer.tokenize(text,
                    getLocation(), getWhitespaceBehavior());
            body.addAll(tokenizer.asComponentDefRefs(this));
        }
    }
View Full Code Here

        boolean skip = getWhitespaceBehavior() == WhitespaceBehavior.OPTIMIZE ? AuraTextUtil
                .isNullEmptyOrWhitespace(text) : AuraTextUtil.isNullOrEmpty(text);

        if (!skip) {
            TextTokenizer tokenizer = TextTokenizer.tokenize(text, getLocation(), getWhitespaceBehavior());
            return tokenizer.asComponentDefRefs(parentHandler);
        }
        return Collections.emptyList();
    }
View Full Code Here

                String attValue = xmlReader.getAttributeValue(i);
                if (attributes.containsKey(att)) {
                    error("Duplicate values for attribute %s on tag %s", att, getTagName());
                }
                TextTokenizer tt = TextTokenizer.tokenize(attValue, getLocation());
                Object value = tt.asValue(getParentHandler());

                AttributeDefRefImpl.Builder atBuilder = new AttributeDefRefImpl.Builder();
                atBuilder.setDescriptor(att);
                atBuilder.setLocation(getLocation());
                atBuilder.setValue(value);
View Full Code Here

        builder.setDescriptor(SubDefDescriptorImpl.getInstance(container, parentDesc, LayoutItemDef.class));
        builder.setContainer(container);

        String action = getAttributeValue(ATTRIBUTE_ACTION);
        if (!AuraTextUtil.isNullEmptyOrWhitespace(action)) {
            TextTokenizer tt = TextTokenizer.tokenize(action, getLocation());
            builder.setAction(tt.asValue(getParentHandler()));
        }

        builder.setCache(getAttributeValue(ATTRIBUTE_CACHE));

        builder.setDescription(getAttributeValue(RootTagHandler.ATTRIBUTE_DESCRIPTION));
View Full Code Here

        DefDescriptor<LayoutsDef> parentDesc = ((LayoutsDefHandler) getParentHandler()).getDefDescriptor();
        builder.setDescriptor(SubDefDescriptorImpl.getInstance(name, parentDesc, LayoutDef.class));

        builder.setName(name);
        builder.setMatch(getAttributeValue(ATTRIBUTE_MATCH));
        TextTokenizer tt = TextTokenizer.tokenize(getAttributeValue(ATTRIBUTE_TITLE), getLocation());
        tt.addExpressionRefs(getParentHandler());
        builder.setTitle(tt.asValue(getParentHandler()));

        builder.setDescription(getAttributeValue(RootTagHandler.ATTRIBUTE_DESCRIPTION));
    }
View Full Code Here

TOP

Related Classes of org.auraframework.impl.util.TextTokenizer

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.