File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/main/kotlin/org/domaframework/doma/intellij/formatter/visitor Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,14 @@ import com.intellij.openapi.command.WriteCommandAction
2020import com.intellij.openapi.fileTypes.FileTypeManager
2121import com.intellij.openapi.project.Project
2222import com.intellij.psi.JavaRecursiveElementVisitor
23+ import com.intellij.psi.PsiAnnotation
2324import com.intellij.psi.PsiDocumentManager
2425import com.intellij.psi.PsiFile
2526import com.intellij.psi.PsiFileFactory
2627import com.intellij.psi.PsiLiteralExpression
2728import com.intellij.psi.codeStyle.CodeStyleManager
2829import org.domaframework.doma.intellij.common.util.StringUtil
30+ import org.domaframework.doma.intellij.extension.psi.DomaAnnotationType
2931import org.domaframework.doma.intellij.formatter.processor.SqlFormatPreProcessor
3032
3133/* *
@@ -56,6 +58,7 @@ class DaoInjectionSqlVisitor(
5658
5759 override fun visitLiteralExpression (expression : PsiLiteralExpression ) {
5860 super .visitLiteralExpression(expression)
61+ if ((expression.parent.parent.parent as ? PsiAnnotation )?.qualifiedName != DomaAnnotationType .Sql .fqdn) return
5962 expression.value?.toString()?.let { originalText ->
6063 val existExpression =
6164 formattingTasks.find { it.expression == expression && ! it.isOriginalTextBlock }
You can’t perform that action at this time.
0 commit comments