package idea.bear.sunday.annotation;

import com.intellij.codeInsight.completion.CompletionContributor;
import com.intellij.codeInsight.completion.CompletionType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManager;
import idea.bear.sunday.BearSundayProjectComponent;

public class AnnotationCompletionContributor extends CompletionContributor {

    public AnnotationCompletionContributor() {
        Project project = ProjectManager.getInstance().getDefaultProject();
        if(!BearSundayProjectComponent.isEnabled(project)) {
            return;
        }
        // @<caret>
        // * @<caret>
        extend(CompletionType.BASIC, AnnotationPatternHelper.getDocBlockTag(), new AnnotationCompletionProvider());

        // @Foo(<caret>)
        extend(CompletionType.BASIC, AnnotationPatternHelper.getDocAttribute(), new AttributeCompletionProvider());

        // @Foo(bar="<caret">)
        extend(CompletionType.BASIC, AnnotationPatternHelper.getTextIdentifier(), new AttributeTextCompletionProvider());
    }

}

@@ -622,30 +622,8 @@
 et%3E%0A
-        // * @%3Ccaret%3E%0A
     

modify doc