Scala file which is not on classpath has wrong icon
Scala files which are not on the classpath but inside of a project are recognized as Scala files (syntax highlighting and code completion do work for example) but there is the wrong file icon associated with these files (the one for a Java file).
Leave a comment
on 2013-11-20 20:23 *
By Simon Schäfer
Ticket created due to this SO question.
on 2013-11-20 20:27 *
By Simon Schäfer
I found out that the icon which is shown for the non classpath Scala file is named
Nevertheless the resource icon is not bound in the
jcu_resource_obj.gif
similar to jcu_obj.gif
for normal Java files (located in org.eclipse.jdt.ui/icons/full/obj16
). The Scala files follow that name scheme (with scu
instead of jcu
).Nevertheless the resource icon is not bound in the
plugins.xml
and I couldn't find out where the binding takes action.
This PR, when merged, might create something (different) that appears with similar symptoms as the above. I'm linking to it for future bug reporters.
In scala-ide:6343b3a4aaceaadde01cc8c9a76b8c01713104eb Adds decorator extension point to change icons for Scala files
Scala files which are not on the classpath of a project get displayed
with an icon that is made for Java files. This commit replaces the Java
icon with a different one by using a decorator. Only the large icon is
replaced - smaller ones in the corners are not affected.
The decorator is enabled by default and can be disabled in
"Preferences/General/Appearance/Label Decorations/Scala Decorations"
This change only affects Scala files that are not on the classpath
because internally they are represented with a different object
compared to all other Scala files.
Fixes #1001975