package editor;


import javax.swing.*;
import java.awt.*;


/**
 */
public class TypeCellRenderer extends DefaultListCellRenderer
{

  public Component getListCellRendererComponent( JList list,
                                                 Object value,
                                                 int modelIndex,
                                                 boolean isSelected,
                                                 boolean cellHasFocus )
  {
    Icon icon = editor.util.EditorUtilities.loadIcon( "images/FileClass.png" );

    String text = getDisplayText( value );
    Component renderer = super.getListCellRendererComponent( list, text, modelIndex, isSelected, cellHasFocus );
    ((JLabel)renderer).setIcon( icon );

    return renderer;
  }

  protected String getDisplayText( Object value )
  {
    String strType = (String)value;
    String strRelativeType = TypePopup.getRelativeTypeName( strType );
    return (strRelativeType + "  (" + strType + ")").replace( '\u2024', '.' );
  }
}

@@ -11,16 +11,88 @@
 itor;%0A%0A%0A
+import editor.util.EditorUtilities;%0Aimport gw.lang.reflect.TypeSystem;%0A%0A
 import j
@@ -549,28 +549,16 @@
  icon = 
-editor.util.
 EditorUt
@@ -569,40 +569,72 @@
 ies.
-loa
+fin
 dIcon( 
-%22images/FileClass.png%22
+TypeSystem.getByFullNameIfValidNoJava( (String)value )
  );%0A

use new icons for goto-type ui