Hi, I'm creating a intellij plugin which needs to show a file's git history
Answered
I'm working with git4idea and I want to show a specific file's git history which is selected.
I want to show this panel in my plugin. How can I get a instance of this panel from a file name or virtual file or other things? Thanks.
Please sign in to leave a comment.
See com.intellij.openapi.vcs.actions.TabbedShowHistoryAction for invocation place
Thank you! But I still don't know how to invoke the action. To invoke it we should call its actionPerformed() method, isn't it? But how can I get an AnActionEvent() instance?
Actually, I got to know that the panel is called the FileHistoryPanel by UI inspector. But its construct method is complicated so I have no idea how to get an instance of this.
The reference to com.intellij.openapi.vcs.actions.TabbedShowHistoryAction was indeed to copy/paste and adapt required lines from actionPerformed() method into your plugin's code, not invoke the Action as is.
Thank you for help, I'm done with this problem!