IconProvider in Diana
I am migrating my Plugin to Diana and have aproblem with IconProvider. I have one that changes class icon in ProjectView under certain conditions. In DIana its method
public Icon getIcon(@NotNull PsiElement element, int flags) {...}
is never called. I checked that it is registered as Application Component (initComponent() is called). Any ideas what has changed?
Thanks in advance,
Misha Bouzinier
Please sign in to leave a comment.
IconProvider impementations now have to be registered via the <iconProvider> extension point in plugin.xml, not as application components. See the available open-source plugins for examples.
Sorry, I cannot find any examples of iconProvider in plugin sources included with devkit. Do you mean <extensionPoint> or <extension>? I tried
<extensions> <com.intellij.iconProvider implementation="..."/></extensions>
and it seems to work but the entry is highlighted in red in plugin.xml. I would rather do it correctly.
Thanks a lot,
Misha
Extension elements are sometimes not highlighted correctly in plugin.xml - this is a problem of IDEA, not of your plugin.