private static void introduceConstant(PsiExpression @NotNull [] expressions, @NotNull Project project) {
    new IntroduceConstantHandler() {
      @Override
      protected OccurrenceManager createOccurrenceManager(PsiExpression selectedExpr, PsiClass parentClass) {
        return new BaseOccurrenceManager(occurrence -> true) {
          @Override
          protected PsiExpression @NotNull [] defaultOccurrences() {
            return expressions;
          }

          @Override
          protected PsiExpression @NotNull [] findOccurrences() {
            return expressions;
          }
        };
      }
    }.invoke(project, expressions);
  }
private static void introduceConstant(PsiExpression @NotNull [] expressions, @NotNull Project project)