public static void showDiffOnHover(@NotNull Editor editor,
                                     @NotNull FileAnnotation fileAnnotation,
                                     @NotNull TextAnnotationPresentation textPresentation,
                                     @NotNull Disposable disposable) {
    if (!(editor instanceof EditorEx)) return;
    FileAnnotation.LineModificationDetailsProvider provider = fileAnnotation.getLineModificationDetailsProvider();
    if (provider == null) return;

    InlineDiffFromAnnotation inlineDiffFromAnnotation =
      new InlineDiffFromAnnotation((EditorEx)editor, fileAnnotation, textPresentation, provider, disposable);
    editor.addEditorMouseMotionListener(inlineDiffFromAnnotation, disposable);
    editor.addEditorMouseListener(inlineDiffFromAnnotation, disposable);
    editor.getDocument().addDocumentListener(inlineDiffFromAnnotation, disposable);
  }
public static void showDiffOnHover(@NotNull Editor editor,
                                     @NotNull FileAnnotation fileAnnotation,
                                     @NotNull TextAnnotationPresentation textPresentation,
                                     @NotNull Disposable disposable)