int parameters = typeName.indexOf('<');
if (parameters >= 0) {
typeName = typeName.substring(0, parameters);
}
name = new StringBuffer(typeName);
IPackageBinding packageBinding = typeBinding.getPackage();
typeBinding = typeBinding.getDeclaringClass();
while (typeBinding != null) {
name.insert(0, '$').insert(0, typeBinding.getName());
typeBinding = typeBinding.getDeclaringClass();
}
if (packageBinding != null && !packageBinding.isUnnamed()) {
name.insert(0, '.').insert(0, packageBinding.getName());
}
return name.toString();
}