@@ -0,0 +1,1472 @@
+package org.intellij.ibatis.intention;%0D%0A%0D%0Aimport com.intellij.openapi.project.Project;%0D%0Aimport com.intellij.openapi.editor.Editor;%0D%0Aimport com.intellij.psi.*;%0D%0Aimport org.jetbrains.annotations.NotNull;%0D%0A%0D%0A/**%0D%0A * generate statement xml code according to sql map client invocation when statement id absent%0D%0A *%0D%0A * @author Jacky%0D%0A */%0D%0Apublic class GenerateStatementXmlCodeAction extends PsiIntentionBase %7B%0D%0A    private static final String NAME = %22GenerateStatementXmlCode%22;%0D%0A    private static final String TEXT = %22Generate statement xml code when statement id absent%22;%0D%0A%0D%0A    protected void invoke(Project project, Editor editor, PsiFile file, @NotNull PsiElement element) %7B%0D%0A%0D%0A    %7D%0D%0A%0D%0A    protected boolean isAvailable(Project project, Editor editor, PsiFile file, @NotNull PsiElement element) %7B%0D%0A        if (element instanceof PsiLiteralExpression) %7B%0D%0A            PsiElement parent = element.getParent().getParent();%0D%0A            if (parent == null %7C%7C !(parent instanceof PsiMethodCallExpression)) %7B%0D%0A                //method name validation simply, filter for detailed validation%0D%0A                String%5B%5D path = ((PsiMethodCallExpression) parent).getMethodExpression().getText().split(%22%5C%5C.%22);%0D%0A                String methodName = path%5Bpath.length - 1%5D.trim();%0D%0A            %7D%0D%0A        %7D%0D%0A        return false;%0D%0A    %7D%0D%0A%0D%0A    @NotNull public String getText() %7B%0D%0A        return TEXT;%0D%0A    %7D%0D%0A%0D%0A    @NotNull public String getFamilyName() %7B%0D%0A        return NAME;%0D%0A    %7D%0D%0A%7D%0D%0A

generate statement xml code action