@@ -0,0 +1,982 @@
+package org.intellij.ibatis.dom.converters;%0D%0A%0D%0Aimport com.intellij.openapi.util.text.StringUtil;%0D%0Aimport com.intellij.util.xml.ConvertContext;%0D%0Aimport com.intellij.util.xml.Converter;%0D%0Aimport org.intellij.ibatis.IbatisManager;%0D%0Aimport org.intellij.ibatis.dom.sqlMap.Sql;%0D%0Aimport org.jetbrains.annotations.NonNls;%0D%0Aimport org.jetbrains.annotations.Nullable;%0D%0A%0D%0Aimport java.util.Map;%0D%0A%0D%0A/**%0D%0A * convert for sql reference%0D%0A *%0D%0A * @author Jacky%0D%0A */%0D%0Apublic class SqlConverter extends Converter%3CSql%3E %7B%0D%0A    @Nullable public Sql fromString(@Nullable @NonNls String sqlName, ConvertContext convertContext) %7B%0D%0A        if (StringUtil.isNotEmpty(sqlName)) %7B%0D%0A            Map%3CString, Sql%3E map = IbatisManager.getInstance().getAllSql(convertContext.getXmlElement());%0D%0A            return map.get(sqlName);%0D%0A        %7D else return null;%0D%0A    %7D%0D%0A%0D%0A    public String toString(@Nullable Sql sql, ConvertContext convertContext) %7B%0D%0A        return sql != null ? sql.getId().getValue() : %22%22;%0D%0A    %7D%0D%0A%7D%0D%0A

convert for sql reference