* @return String
* @param typeExpr
*/
public String getTypeIconName(TypeExpr typeExpr) {
TypeConsApp typeConsApp = typeExpr.rootTypeConsApp();
String iconName = "/Resources/sometype.gif";
if (typeConsApp != null) {
QualifiedName typeIde = typeConsApp.getName();
// Note: The bool check should come before the enumerated check. Since bool can count as an enumerated type.
if (typeIde.equals(CAL_Prelude.TypeConstructors.Boolean)) {
iconName = "/Resources/bool.gif";
} else if (typeIde.equals(CAL_Prelude.TypeConstructors.Double) ||
typeIde.equals(CAL_Prelude.TypeConstructors.Float) ||
typeIde.equals(CAL_Prelude.TypeConstructors.Decimal)) {
iconName = "/Resources/float.gif";
} else if (typeIde.equals(CAL_Prelude.TypeConstructors.Int) ||
typeIde.equals(CAL_Prelude.TypeConstructors.Integer) ||
typeIde.equals(CAL_Prelude.TypeConstructors.Byte) ||
typeIde.equals(CAL_Prelude.TypeConstructors.Short) ||
typeIde.equals(CAL_Prelude.TypeConstructors.Long)) {
iconName = "/Resources/integer.gif";
} else if (typeIde.equals(CAL_Prelude.TypeConstructors.Char)) {
iconName = "/Resources/char.gif";
} else if (typeIde.equals(CAL_RelativeTime.TypeConstructors.RelativeDate)) {
iconName = "/Resources/date.gif";
} else if (typeIde.equals(CAL_RelativeTime.TypeConstructors.RelativeTime)) {
iconName = "/Resources/time.gif";
} else if (typeIde.equals(CAL_RelativeTime.TypeConstructors.RelativeDateTime) ||
typeIde.equals(CAL_Time.TypeConstructors.Time)) {
iconName = "/Resources/datetime.gif";
} else if (typeIde.equals(CAL_Color.TypeConstructors.Color)) {
iconName = "/Resources/colour.gif";
} else if (typeIde.equals(CAL_File.TypeConstructors.FileName)) {
iconName = "/Resources/file.gif";
} else if (typeIde.equals(CAL_Prelude.TypeConstructors.String)) {
iconName = "/Resources/string.gif";
} else if (typeIde.equals(CAL_Prelude.TypeConstructors.List)) {
TypeExpr elementTypeExpr = typeConsApp.getArg(0);
TypeConsApp elementTypeConsApp = elementTypeExpr.rootTypeConsApp();
if (elementTypeConsApp != null) {
QualifiedName elementIde = elementTypeConsApp.getName();
if (elementIde.equals(CAL_Prelude.TypeConstructors.Char)) {
iconName = "/Resources/string.gif";
} else {