Adding an menu item in the context menu when right clicked on a file
Answered
Hi ,
We are working on an internal plugin in which i would like to add a menu item to the context menu that get populated when you right click on the file. Below is the snapshot when i right clicked on a file. I was able to add it in the Popup menu when you click within the editor but was not able to get it on the popup menu that gets created on right click of a file. Any help would be deeply appreciated
Please sign in to leave a comment.
Hi Vikram,
Add your action to the
ProjectViewPopupMenu
, e.g.:Karol Lewandowski Thanks for the help i was able to add a group to "ProjectViewPopupMenu", I needed one more help I needed to add a Separator between my group ie "Polaris Help" and Create Gist. I was able to add the separator between action that are present in the group but i am not sure how to add a Separator between my group and other groups
Need Separator after polaris help
My group section in pulgin.xml
Hi,
It can be done:
programmatically - you can extend
com.intellij.openapi.actionSystem.DefaultActionGroup
and useaddSeparator()
.Karol Lewandowski Useful, but the
<separator/>
should inmy_group
, or it will not appear inProjectViewPopupMenu
.