Can i change icon of a file depending on it's contents?

Hi!

I have my file type and i have registered an extension with it, but i want to
show different icons depending on whether my file has a particular psi element
or not. Is it possible and if yes then how?

4 comments
Comment actions Permalink

Hello __jay,

_> I have my file type and i have registered an extension with it, but i
_> want to show different icons depending on whether my file has a
_> particular psi element or not. Is it possible and if yes then how?

Create an application component that implements the IconProvider interface
(added in 6.0).

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

thank you!

and in 5.1 per chance?

0
Comment actions Permalink


By the way, don't you know what's the second parameter of IconProvider's getIcon
method?

0
Comment actions Permalink

Those are the flags defined in com.intellij.openapi.util.Iconable

Sascha

0

Please sign in to leave a comment.