private static @NotNull List<PsiTryStatement> collectTryStatementStack(@Nullable PsiElement startElement,
                                                                         @NotNull PsiElement enclosingCodeFragment) {
    final List<PsiTryStatement> stack = new ArrayList<>();
    for (PsiTryStatement tryStatement = getEnclosingTryStatementHavingCatchOrFinally(startElement, enclosingCodeFragment);
         tryStatement != null;
         tryStatement = getEnclosingTryStatementHavingCatchOrFinally(tryStatement, enclosingCodeFragment)) {
      stack.add(tryStatement);
    }
    return stack;
  }
private static @NotNull List<PsiTryStatement> collectTryStatementStack(@Nullable PsiElement startElement,
                                                                         @NotNull PsiElement enclosingCodeFragment)