Package com.intellij.codeInsight.template.impl

Examples of com.intellij.codeInsight.template.impl.TemplateSettings


    }

    void loadTemplates (InputStream inputStream, final String templateName) {
        final SAXBuilder parser = new SAXBuilder();
        try {
            TemplateSettings templateSettings = TemplateSettings.getInstance();
            Document doc = parser.build(inputStream);
            Element root = doc.getRootElement();
            for (Object element : root.getChildren()) {
                if (element instanceof Element) {
                    final Template template = readExternal((Element) element, templateName);
                    final String key = template.getKey();
                    // Only add if not present
                    if (key != null && templateSettings.getTemplate(key) == null) {
                        templateSettings.addTemplate(template);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.intellij.codeInsight.template.impl.TemplateSettings

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.