private static boolean isMemberPart(@Nullable PsiElement prevSibling) {
    if (prevSibling == null || prevSibling instanceof PsiPackageStatement || prevSibling instanceof PsiImportList) return false;
    PsiJavaToken token = tryCast(prevSibling, PsiJavaToken.class);
    if (token == null) return true;
    IElementType tokenType = token.getTokenType();
    return tokenType != JavaTokenType.RBRACE;
  }
private static boolean isMemberPart(@Nullable PsiElement prevSibling)