void (@NotNull final Project project, PsiElement @NotNull [] elements, DataContext dataContext) { if (elements.length != 1) return; myProject = project; PsiElement element = elements[0]; if (element instanceof GrTypeDefinition) { GrTypeDefinition aClass = (GrTypeDefinition)element; invokeImpl(project, dataContext, aClass, null); } else if (element instanceof GrMethod || element instanceof GrField) { GrTypeDefinition aClass = (GrTypeDefinition)((GrMember)element).getContainingClass(); invokeImpl(project, dataContext, aClass, element); } }