ListCellRenderer for PsiReference?

I'm writing a plugin for my company, where I'm using

PsiReferenceBase.Immediate(element, it.xmlElement)

to create a Reference between an element inside a JSP to a relevant position inside a xml-file.

This works mostly.

Now, I'm not satisfied with the default renderer. When I currently click on the element in the JSP, IDEA shows a list of all positions of the xml. But they look all similar, so I would like to create my own ListCellRenderer to visualize the difference. Where can I register this class?



You can try to implement your own ElementDescriptionProvider and register it with order="first" to override XmlUsageViewDescriptionProvider.


I've tried it, but my code wasn't called. To be more precise:

In a JSP we have something like this:

<abc:include type="blocklink" contentMap="${block.blockView}"/>

The type-attribute is "linked" to another XML-tags in some XML-files.

<template type="blocklink" model="RasterBlockView">/common/templates/abc-nt/rasterBlock/blocklink.jsp</template>

When clicking on the type in the JSP one will see only the tagname, but this is always "<template>". There should be some more informations, like some data from the surrounding tag.




Please sign in to leave a comment.