Search code examples
intellij-ideajetbrains-ideintellij-plugin

IntelliJ Plugin: Add entry to Git log branches context menu


I want to create a plugin that adds an entry to the context menu when the user performs a right click on the branches in git log. What is the corresponding group id?

enter image description here

Currently I only have the item in the context menu of the commits:

<extensions defaultExtensionNs="com.intellij">
</extensions>

<actions>
   <action id="GitlabMergeRequestAction"
           class="com.mypackage.myplugin.action.MyAction"
           text="Custom context menu entry">
           <add-to-group group-id="Git.Log.ContextMenu" anchor="first"/>
   </action>
</actions>

Solution

  • I posted the question in the intellij community. Unfortunately the context menu is not extensible, because it is created programatically. See https://github.com/JetBrains/intellij-community/blob/master/plugins/git4idea/src/git4idea/ui/branch/GitBranchPopupActions.java.