boolean (PsiTypeCodeFragment typeCodeFragment, boolean allowEllipsis) { try { final PsiType type = typeCodeFragment.getType(); return allowEllipsis || !(type instanceof PsiEllipsisType); } catch (PsiTypeCodeFragment.TypeSyntaxException e) { return false; } catch (PsiTypeCodeFragment.NoTypeException e) { return true; //Groovy accepts methods and parameters without explicit type } }