boolean askReloadFromDisk(VirtualFile file, Document document) {
    if (myConflictAppeared != null) {
      Throwable trace = myConflictAppeared;
      myConflictAppeared = null;
      throw new IllegalStateException("Unexpected memory-disk conflict in tests for " + file.getPath() +
                                      ", please use FileDocumentManager#reloadFromDisk or avoid VFS refresh", trace);
    }

    String message = UIBundle.message("file.cache.conflict.message.text", file.getPresentableUrl());

    DialogBuilder builder = new DialogBuilder();
    builder.setCenterPanel(new JLabel(message, Messages.getQuestionIcon(), SwingConstants.CENTER));
    builder.addOkAction().setText(UIBundle.message("file.cache.conflict.load.fs.changes.button"));
    builder.addCancelAction().setText(UIBundle.message("file.cache.conflict.keep.memory.changes.button"));
    builder.addAction(new AbstractAction(UIBundle.message("file.cache.conflict.show.difference.button")) {
      @Override
      public void actionPerformed(ActionEvent e) {
        Project project = ProjectLocator.getInstance().guessProjectForFile(file);
        String fsContent = LoadTextUtil.loadText(file).toString();
        DocumentContent content1 = DiffContentFactory.getInstance().create(project, fsContent, file.getFileType());
        DocumentContent content2 = DiffContentFactory.getInstance().create(project, document, file);
        String title = UIBundle.message("file.cache.conflict.for.file.dialog.title", file.getPresentableUrl());
        String title1 = UIBundle.message("file.cache.conflict.diff.content.file.system.content");
        String title2 = UIBundle.message("file.cache.conflict.diff.content.memory.content");
        DiffRequest request = new SimpleDiffRequest(title, content1, content2, title1, title2);
        request.putUserData(DiffUserDataKeys.GO_TO_SOURCE_DISABLE, true);
        DialogBuilder diffBuilder = new DialogBuilder(project);
        DiffRequestPanel diffPanel = DiffManager.getInstance().createRequestPanel(project, diffBuilder, diffBuilder.getWindow());
        diffPanel.setRequest(request);
        diffBuilder.setCenterPanel(diffPanel.getComponent());
        diffBuilder.setDimensionServiceKey("FileDocumentManager.FileCacheConflict");
        diffBuilder.addOkAction().setText(UIBundle.message("file.cache.conflict.save.changes.button"));
        diffBuilder.addCancelAction();
        diffBuilder.setTitle(title);
        if (diffBuilder.show() == DialogWrapper.OK_EXIT_CODE) {
          builder.getDialogWrapper().close(DialogWrapper.CANCEL_EXIT_CODE);
        }
      }
    });
    builder.setTitle(UIBundle.message("file.cache.conflict.dialog.title"));
    builder.setHelpId("reference.dialogs.fileCacheConflict");
    return builder.show() == 0;
  }
boolean askReloadFromDisk(VirtualFile file, Document document)