[svn] r6400: nemerle/trunk/ncc/completion/CodeCompletionEngine.n

trupill svnadmin at nemerle.org
Wed Jun 14 17:59:57 CEST 2006


Log:
Show special names for types such as int, long, instead of their 
Framework type names such as System.Int32...


Author: trupill
Date: Wed Jun 14 17:59:55 2006
New Revision: 6400

Modified:
   nemerle/trunk/ncc/completion/CodeCompletionEngine.n

Modified: nemerle/trunk/ncc/completion/CodeCompletionEngine.n
==============================================================================
--- nemerle/trunk/ncc/completion/CodeCompletionEngine.n	(original)
+++ nemerle/trunk/ncc/completion/CodeCompletionEngine.n	Wed Jun 14 17:59:55 2006
@@ -518,6 +518,39 @@
          public static GetNameFromType (t : MType) : string
          {
             | Class as c => mutable name = c.tycon.FrameworkTypeName;
+                
+                // Look for special names
+                when (name == "System.Byte")
+                    name = "byte";
+                when (name == "System.SByte")
+                    name = "sbyte";
+                when (name == "System.Int16")
+                    name = "short";
+                when (name == "System.UInt16")
+                    name = "ushort";
+                when (name == "System.Int32")
+                    name = "int";
+                when (name == "System.UInt32")
+                    name = "uint";
+                when (name == "System.Int64")
+                    name = "long";
+                when (name == "System.UInt64")
+                    name = "ulong";
+                when (name == "System.Single")
+                    name = "float";
+                when (name == "System.Double")
+                    name = "double";
+                when (name == "System.Decimal")
+                    name = "decimal";
+                when (name == "System.String")
+                    name = "string";
+                when (name == "System.Object")
+                    name = "object";
+                when (name == "System.Boolean")
+                    name = "bool";
+                when (name == "System.Char")
+                    name = "char";
+                    
                 when (c.args.Length > 0)
                 {
                     name += "[";



More information about the svn mailing list