what is the feature

Answered

I want write a plugin for a custom language. 

I want to implement a function like the picture. When I click on a variable, the background color of all the same variables changes.

How to implement this function?

 
4 comments
Comment actions Permalink

This is provided "automatically" by IDE in com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass for PSI Reference (https://jetbrains.org/intellij/sdk/docs/basics/architectural_overview/psi_references.html) and/or Find Usages (https://jetbrains.org/intellij/sdk/docs/reference_guide/custom_language_support/find_usages.html)

0
Comment actions Permalink

how to implent a code about the background highlight ,  Is there documentation or code I can refer to?

0
Comment actions Permalink

One way is shown in IdentifierHighlighterPass I linked in my previous answer. Another is Annotator https://jetbrains.org/intellij/sdk/docs/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.html

0

Please sign in to leave a comment.