Custom icons

How can I specify the file editor icon for a particular type of file? Ideally I'd like to be able to plug in something that gets a PsiFile/PsiClass, and return an Icon for that.

0
Avatar
Permanently deleted user

I'm pretty sure that's not doable with the current API. I really, really wanted to do something like that with a variety of classes, and pretty firmly found out that nothing like that was available. It's nice that there are special icons for abstract methods and JUnit test cases, but I'd really like icons for utility classes and singletons. No can do...

--Dave Griffith

0

Looks like you're right. It's hardcoded into PsiElementBase, with no way to hook into it.

It'd be pretty funny to developer a plugin helper library that (ab)uses AOP to inject functionality in such cases ;)

0
Avatar
Permanently deleted user

Hello Hani,

HS> How can I specify the file editor icon for a particular type of
HS> file? Ideally I'd like to be able to plug in something that gets a
HS> PsiFile/PsiClass, and return an Icon for that.

I've added a request (IDEABKL-3465) to add this functionality to the OpenAPI.

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


0

请先登录再写评论。