listener for ide actions Marat Gizatullin Created November 23, 2016 20:52 I am creating first plugin for idea.Can I create listener for ide actions like "on open file", "on close file", "commit in git" and etc My be link to documentation or examples? thank you
Hi,
As for listening for "on open file" and "on close file" event, it can be archived with this code:
To listen for "commit in git", you may use `com.intellij.openapi.vcs.checkin.CheckinHandlerFactory` extension point:
Register it in plugin.xml
Then you need to obtain information about checked in files in com.intellij.openapi.vcs.checkin.CheckinHandler#checkinSuccessful (see javadoc):
public void checkinSuccessful() {panel.getFiles()
}
See another example: com.intellij.tools.ExternalToolsCheckinHandlerFactory.
As for documentation or examples, please refer to IntelliJ IDEA source code https://github.com/JetBrains/intellij-community and http://www.jetbrains.org/intellij/sdk/docs