// Path: src/com/aopphp/go/completion/insert/PointcutKeywordInsertHandler.java
// public class PointcutKeywordInsertHandler implements InsertHandler<LookupElement> {
// 
//     private static final PointcutKeywordInsertHandler INSTANCE = new PointcutKeywordInsertHandler();
// 
//     public void handleInsert(@NotNull InsertionContext context, @NotNull LookupElement lookupElement) {
// 
//         // reuse jetbrains "use importer": this is private only so we need some workaround
//         // to not implement your own algo for that
//         PhpReferenceInsertHandler.getInstance().handleInsert(context, lookupElement);
//         if(!PhpInsertHandlerUtil.isStringAtCaret(context.getEditor(), "(")) {
//             PhpInsertHandlerUtil.insertStringAtCaret(context.getEditor(), "()");
//             context.getEditor().getCaretModel().moveCaretRelatively(-1, 0, false, false, true);
//         }
//     }
// 
//     public static PointcutKeywordInsertHandler getInstance(){
//         return INSTANCE;
//     }
// }


import com.aopphp.go.completion.insert.PointcutKeywordInsertHandler;
import com.intellij.codeInsight.completion.CompletionParameters;
import com.intellij.codeInsight.completion.CompletionProvider;
import com.intellij.codeInsight.completion.CompletionResultSet;
import com.intellij.codeInsight.lookup.LookupElementBuilder;
import com.intellij.psi.PsiElement;
import com.intellij.util.ProcessingContext;
import org.jetbrains.annotations.NotNull;
package com.aopphp.go.completion;


public class PointcutKeywordCompletionProvider extends CompletionProvider<CompletionParameters>
{
    private static final String[] POINTCUT_TYPES = new String[]{
        "execution",
        "access",
        "within",
        "initialization",
        "staticinitialization",
        "matchInherited",
    };

// Path: src/com/aopphp/go/completion/insert/PointcutKeywordInsertHandler.java
// public class PointcutKeywordInsertHandler implements InsertHandler<LookupElement> {
// 
//     private static final PointcutKeywordInsertHandler INSTANCE = new PointcutKeywordInsertHandler();
// 
//     public void handleInsert(@NotNull InsertionContext context, @NotNull LookupElement lookupElement) {
// 
//         // reuse jetbrains "use importer": this is private only so we need some workaround
//         // to not implement your own algo for that
//         PhpReferenceInsertHandler.getInstance().handleInsert(context, lookupElement);
//         if(!PhpInsertHandlerUtil.isStringAtCaret(context.getEditor(), "(")) {
//             PhpInsertHandlerUtil.insertStringAtCaret(context.getEditor(), "()");
//             context.getEditor().getCaretModel().moveCaretRelatively(-1, 0, false, false, true);
//         }
//     }
// 
//     public static PointcutKeywordInsertHandler getInstance(){
//         return INSTANCE;
//     }
// }


// Path: src/com/aopphp/go/completion/PointcutKeywordCompletionProvider.java
import com.aopphp.go.completion.insert.PointcutKeywordInsertHandler;
import com.intellij.codeInsight.completion.CompletionParameters;
import com.intellij.codeInsight.completion.CompletionProvider;
import com.intellij.codeInsight.completion.CompletionResultSet;
import com.intellij.codeInsight.lookup.LookupElementBuilder;
import com.intellij.psi.PsiElement;
import com.intellij.util.ProcessingContext;
import org.jetbrains.annotations.NotNull;

package com.aopphp.go.completion;


public class PointcutKeywordCompletionProvider extends CompletionProvider<CompletionParameters>
{
    private static final String[] POINTCUT_TYPES = new String[]{
        "execution",
        "access",
        "within",
        "initialization",
        "staticinitialization",
        "matchInherited",
    };

    private static final PointcutKeywordInsertHandler keywordInsertionHandler = PointcutKeywordInsertHandler.getInstance();