public QuickEditHandler invokeImpl(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
    int offset = editor.getCaretModel().getOffset();
    Pair<PsiElement, TextRange> pair = Objects.requireNonNull(getRangePair(file, editor));

    PsiFile injectedFile = (PsiFile)pair.first;
    QuickEditHandler handler = getHandler(project, injectedFile, editor, file);

    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      DocumentWindow documentWindow = InjectedLanguageUtil.getDocumentWindow(injectedFile);
      if (documentWindow != null) {
        handler.navigate(InjectedLanguageUtil.hostToInjectedUnescaped(documentWindow, offset));
      }
    }
    return handler;
  }
public QuickEditHandler invokeImpl(@NotNull Project project, Editor editor, PsiFile file)