public static InitialInfo invoke(Project project, Editor editor, PsiFile file, int start, int end, boolean forceStatements) throws GrRefactoringError {
    PsiDocumentManager.getInstance(project).commitAllDocuments();

    if (!(file instanceof GroovyFileBase)) {
      throw new GrRefactoringError(GroovyRefactoringBundle.message("only.in.groovy.files"));
    }

    if (!CommonRefactoringUtil.checkReadOnlyStatus(project, file)) {
      throw new GrRefactoringError(RefactoringBundle.message("readonly.occurences.found"));
    }

    PsiDocumentManager.getInstance(project).commitAllDocuments();

    final StringPartInfo stringPart = StringPartInfo.findStringPart(file, start, end);
    if (stringPart != null) {
      return new InitialInfo(VariableInfo.EMPTY_ARRAY, VariableInfo.EMPTY_ARRAY, PsiElement.EMPTY_ARRAY, GrStatement.EMPTY_ARRAY, new ArrayList<>(), stringPart, project, null);
    }

    final SelectionModel selectionModel = editor.getSelectionModel();
    if (!forceStatements) {
      GrVariable variable = GrIntroduceHandlerBase.findVariable(file, start, end);
      if (variable != null) {
        GrExpression initializer = variable.getInitializerGroovy();
        if (initializer != null) {
          TextRange range = initializer.getTextRange();
          return buildInfo(project, file, range.getStartOffset(), range.getEndOffset(), forceStatements, selectionModel, variable);
        }
      }
    }

    return buildInfo(project, file, start, end, forceStatements, selectionModel, null);
  }
public static InitialInfo invoke(Project project, Editor editor, PsiFile file, int start, int end, boolean forceStatements)