don't take icons from synthetic classes

This commit is contained in:
Peter Gromov
2009-09-11 16:45:10 +04:00
parent 53865be826
commit 21e685a4c4
@@ -48,7 +48,7 @@ public class JavaFileIconPatcher implements FileIconPatcher {
// prefer icon of the class named after file
final String fileName = file.getNameWithoutExtension();
for (PsiClass aClass : classes) {
if (Comparing.strEqual(aClass.getName(), fileName)) {
if (!(aClass instanceof SyntheticElement) && Comparing.strEqual(aClass.getName(), fileName)) {
return aClass.getIcon(flags);
}
}