SharedProcessingContext between CompletionContributors


I'm trying to share information between different CompletionContributors for Basic Completion.

I thought I could use the context.getSharedContext (== SharedProcessingContext), however, for every Contributor that responds to the element pattern, the SharedProcessingContext is different. This makes sense when I look at com.intellij.codeInsight.completion.CompletionContributor#fillCompletionVariants. The ProcessingContext is created as new Context, without the optional parameter to set the SharedProcessingContext.  When no SharedProcessingContext is provided, it will simple return a new instance.

Am I missing something or is this feature actually not used for CompletionContributors. If not, is there another way to 'communicate' between different completion contributor extensions?

1 comment
Comment actions Permalink

What kind of data do you need to share between multiple contributors? Is that data really only relevant for completion I assume?


Please sign in to leave a comment.