Highlight usages of element at caret

Hello

I develop a custom language plugin. Currently, I try to understand references and find usages etc. In my custom language I can search for usages via ALT+F7 but the functionality "highlighting usages of element at caret" is not working.

What is the background of that functionality? What are the main classes which are envolved?

Cheers
Stefan

3 comments

Hi Stefan,

Take a look into com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass

The general idea is to register a custom highlighting pass which registers highlighters at markup model (UpdateHighlightersUtil.setHighlightersToEditor()). The passes are automatically run by the ide on document modification.

Denis

0

Hi Denis

thanks for the quick answer. That helped me!

Cheers
Stefan

0

Please sign in to leave a comment.