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.

0
5 comments

See com.intellij.openapi.vcs.actions.TabbedShowHistoryAction for invocation place

0

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?

0

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.

0

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.

0

Thank you for help, I'm done with this problem!

0

Please sign in to leave a comment.