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.

5 comments
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

0

Please sign in to leave a comment.