Define extension point implementation order

Answered

I am implementing a plugin which depends on 'git4idea'. In the old days, my functionality did work. and My code was called. I am writing a custom commit message provider. But now, because (last year) 'git4idea' implemented one provider with order 'first', my provider is newer called. And I can't find any way to make it be called? Does there exist action after message loaded? I need to be notified to do some message enrichment after load. Or load it myself and enrich it.

Place: plugin.xml(Git4Idea)
614: <vcs.commitMessageProvider implementation="git4idea.commit.GitCommitTemplateMessageProvider" order="first"/> 

And I can't get to be called before this, or notified after this.

Calling logic: com.intellij.vcs.commit.AbstractCommitMessagePolicy:getCommitMessageFor
CommitMessageProvider.EXTENSION_POINT_NAME.extensionList.forEach { provider ->
  val providerMessage = provider.getCommitMessage(changeList, project)
  if (providerMessage != null) return providerMessage

1 comment
Comment actions Permalink

Hi Marius,

Please describe more about your extension and what you want to achieve with it.


The explanation why you extension is not called:

I guess you have Git commit template defined in the project: 

git4idea.commit.GitCommitTemplateMessageProvider.getCommitMessage

 returns something non empty.

If so, then commit template should go first. If no commit template specified in the project, then it can be loaded from different places (other 

com.intellij.openapi.vcs.changes.ui.CommitMessageProvider

).

You can disable Git commit template for the project and you extension should work. Is it work for you?

0

Please sign in to leave a comment.