@@ -0,0 +1,1669 @@
+package org.intellij.ibatis.dom.sqlMap.impl;%0D%0A%0D%0Aimport com.intellij.javaee.model.xml.impl.BaseImpl;%0D%0Aimport com.intellij.openapi.util.text.StringUtil;%0D%0Aimport com.intellij.psi.PsiElement;%0D%0Aimport com.intellij.psi.xml.XmlAttribute;%0D%0Aimport com.intellij.psi.xml.XmlTag;%0D%0Aimport com.intellij.psi.xml.XmlText;%0D%0A%0D%0A/**%0D%0A * sentence base implement in sql map file%0D%0A */%0D%0Apublic abstract class SentenceBaseImpl extends BaseImpl %7B%0D%0A%0D%0A    /**%0D%0A     * got SQL code in sentence%0D%0A     *%0D%0A     * @return  SQL code in sentence%0D%0A     */%0D%0A    @SuppressWarnings(%7B %22StringConcatenationInsideStringBufferAppend%22%7D) public String getSQL() %7B%0D%0A        StringBuilder sql = new StringBuilder();%0D%0A        PsiElement%5B%5D children = getXmlTag().getChildren();%0D%0A        for (PsiElement child : children) %7B%0D%0A            if (child instanceof XmlTag) %7B%0D%0A                XmlTag tag = (XmlTag) child;%0D%0A                if (tag.getName().equals(%22include%22)) %7B%0D%0A                    XmlAttribute refid = tag.getAttribute(%22refid%22);%0D%0A                    if (refid != null && StringUtil.isNotEmpty(refid.getText())) %7B%0D%0A                        PsiElement psiElement = refid.getValueElement().getReference().resolve();%0D%0A                        if (psiElement instanceof XmlAttribute) %7B%0D%0A                            XmlAttribute idAttribute = (XmlAttribute) psiElement;%0D%0A                            sql.append(%22 %22 + idAttribute.getParent().getValue().getText());%0D%0A                        %7D%0D%0A                    %7D%0D%0A                %7D%0D%0A            %7D else if (child instanceof XmlText) %7B%0D%0A                sql.append(%22 %22 + ((XmlText) child).getValue());%0D%0A            %7D%0D%0A        %7D%0D%0A        return sql.toString();%0D%0A    %7D%0D%0A%7D%0D%0A

sentence base implementation