Integration into Vcs Commit command

已回答

Hi, I'm writing my own code inspection plugin.Now,I want to integrate my plugin  before Vcs Commit command.

So the effect should be like:
1) User clicks Commit
2) perform my inspection analysis
3) Commit is performed if it doesn't have bugs.

I know this already in IDEA,but I only care my own inspections.

so my question is,which API I can implement this.

0

You can use com.intellij.openapi.vcs.checkin.CheckinHandler. 

See https://plugins.jetbrains.com/intellij-platform-explorer/?extensions=com.intellij.checkinHandlerFactory for usage examples.
Ex: UnloadedModulesCompilationCheckinHandler or CodeAnalysisBeforeCheckinHandler from IJ-community sources.

0

请先登录再写评论。