GutterIconRenderer (@NotNull final ThreeSide sourceSide, @NotNull final ThreeSide modifiedSide, @NotNull final @NlsContexts.Tooltip String tooltipText, @NotNull final Icon icon, @NotNull final Runnable perform) { return new DiffGutterRenderer(icon, tooltipText) { @Override protected void handleMouseClick() { if (!isValid()) return; final Project project = myViewer.getProject(); final Document document = myViewer.getEditor(modifiedSide).getDocument(); DiffUtil.executeWriteCommand(document, project, DiffBundle.message("message.replace.change.command"), perform); } }; }