Customizable DiffTool
Answered
Hello,
I need to show the diff of two files for my plugin. I would like to have a UI/UX similar to the AI Assistant.
Could you please advise if it is possible to customize the DiffTool in such a way that the comboBoxButton with the viewer type and ignore Policy are removed, and buttons like Accept All and Reject are added, similar to the AI Assistant?
One method I tried to achieve this was to create an action and add it to the add-to-group group-id="Diff.ViewerToolbar", but this overrides the built-in toolbar, and I need my own.
I also tried using diffRequest.putUserData(DiffUserDataKeys.GO_TO_SOURCE_DISABLE, true)
, but I couldn't find an option there to remove the ignorePolicy and viewer type.
Please sign in to leave a comment.
Hi,
Toolbar can be customized by implementing DiffViewer, see https://github.com/JetBrains/intellij-community/blob/master/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/tool/PatchDiffViewer.kt as an example.