Package org.webharvest.definition

Examples of org.webharvest.definition.ElementInfo


        Iterator iterator = this.elementInfos.entrySet().iterator();
        while (iterator.hasNext()) {
            Map.Entry entry = (Map.Entry) iterator.next();
            String key = (String) entry.getKey();
            if ( prefix == null || key.toLowerCase().startsWith(prefix) ) {
                ElementInfo elementInfo = (ElementInfo) entry.getValue();
                model.addElement(elementInfo.getName());
            }
        }

        boolean addCData = CDATA_NAME.toLowerCase().startsWith("<" + prefix);
        boolean addXmlComment = XML_COMMENT_NAME.toLowerCase().startsWith("<" + prefix);
View Full Code Here


        elementName = elementName.toLowerCase();
        prefix = prefix.toLowerCase();

        this.model.clear();

        ElementInfo elementInfo = DefinitionResolver.getElementInfo(elementName);
        if (elementInfo != null) {
            for (Object attObj: elementInfo.getAttsSet()) {
                if (attObj != null) {
                    String att = ((String)attObj).toLowerCase();
                    if ( att.startsWith(prefix) && !"id".equals(att) ) {
                        model.addElement(att);
                    }
View Full Code Here

    }

    private void defineAttributeValuesMenu(String tagName, String attributeName, String attValuePrefix) {
        this.model.clear();

        ElementInfo elementInfo = DefinitionResolver.getElementInfo(tagName);
        if (elementInfo != null) {
            String[] suggs = elementInfo.getAttributeValueSuggestions(attributeName);
            if (suggs != null) {
                for (String s: suggs) {
                    if (s.toLowerCase().startsWith(attValuePrefix)) {
                        model.addElement(s);
                    }
View Full Code Here

            xmlPane.setCaretPosition( xmlPane.getCaretPosition() - 4 );
        } else if ( XML_COMMENT_NAME.equals(name) ) {
            document.insertString(pos, "<!--  -->".substring(this.prefixLength), null);
            xmlPane.setCaretPosition( xmlPane.getCaretPosition() - 4 );
        } else {
            ElementInfo info = DefinitionResolver.getElementInfo(name);
            if (info != null) {
                String template = info.getTemplate(true).substring(this.prefixLength);
                document.insertString(pos, template, null);
                int closingIndex = template.lastIndexOf("</");
                if (closingIndex >= 0) {
                    xmlPane.setCaretPosition( xmlPane.getCaretPosition() - template.length() + closingIndex );
                }
View Full Code Here

TOP

Related Classes of org.webharvest.definition.ElementInfo

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.