private static void addDeclarationInsideBlock(@NotNull PsiStatement statement, @NotNull PsiPatternVariable variable) {
      String text = getDeclarationStatement(variable);
      if (text == null) {
        return;
      }
      Project project = statement.getProject();
      PsiElementFactory factory = JavaPsiFacade.getElementFactory(project);
      PsiStatement declarationStatement = factory.createStatementFromText(text, statement);
      BlockUtils.addBefore(statement, declarationStatement);
    }
private static void addDeclarationInsideBlock(@NotNull PsiStatement statement, @NotNull PsiPatternVariable variable)