Icon (final RadComponent component) { if (!(component instanceof RadErrorComponent)) { final Palette palette = Palette.getInstance(component.getProject()); final ComponentItem item = palette.getItem(component.getComponentClassName()); final Icon icon; if (item != null) { icon = item.getSmallIcon(); } else { icon = UIDesignerIcons.Unknown; } return icon; } else { return AllIcons.General.Error; } }