resolve() invoked multiple times

In my plugin I have created a reference using PsiReferenceContributor, PsiReferenceProvider and PsiReferenceBase. When I put my mouse over the element, the resolve() method is invoked multiple times (from 4 to 6 times). Is this a normal thing?

  • I ensured that I have registered only once.
  • I also ensured that it's not something to do with ElementPattern.

My plugin works with no issues, but I just wanted to know why resolve() is invoked randomly multiple times.

 

1 comment

Hi Hentry,

normally resolve result is cached and then multiple calls to resolve method should not lead to any performance problems. From your description, it's not quite clear if these calls are caused by different clients and if these calls performs anything or just retrieve data from cache.

Anna

0

Please sign in to leave a comment.