Search in sources :

Example 1 with JavaOverrideMethodsHandler

use of com.intellij.codeInsight.generation.JavaOverrideMethodsHandler in project intellij-community by JetBrains.

the class OverrideImplement15Test method testInAnnotationType.

public void testInAnnotationType() {
    String name = getTestName(false);
    configureByFile(BASE_DIR + "before" + name + ".java");
    int offset = getEditor().getCaretModel().getOffset();
    PsiElement context = getFile().findElementAt(offset);
    final PsiClass aClass = PsiTreeUtil.getParentOfType(context, PsiClass.class);
    assertTrue(aClass != null && aClass.isAnnotationType());
    final JavaOverrideMethodsHandler handler = new JavaOverrideMethodsHandler();
    assertTrue(handler.isValidFor(getEditor(), getFile()));
    assertFalse(handler.isAvailableForQuickList(getEditor(), getFile(), new MapDataContext()));
}
Also used : MapDataContext(com.intellij.testFramework.MapDataContext) JavaOverrideMethodsHandler(com.intellij.codeInsight.generation.JavaOverrideMethodsHandler)

Aggregations

JavaOverrideMethodsHandler (com.intellij.codeInsight.generation.JavaOverrideMethodsHandler)1 MapDataContext (com.intellij.testFramework.MapDataContext)1