[601801] Fixes for parsing nant documentation
authorMarek Safar <marek.safar@gmail.com>
Wed, 20 Oct 2010 15:00:14 +0000 (16:00 +0100)
committerMarek Safar <marek.safar@gmail.com>
Wed, 20 Oct 2010 15:23:39 +0000 (16:23 +0100)
Gleb Golubitsky <rush.william@gmail.com>

mcs/.gitignore
mcs/mcs/doc.cs
mcs/tests/test-xml-55-ref.xml [new file with mode: 0644]
mcs/tests/test-xml-55.cs [new file with mode: 0644]

index f3e7d6b0fb0a07206df690afd2c96cc5b53d6ec2..1a170359741093ef5aa5819eaed13491299a2476 100644 (file)
@@ -14,8 +14,6 @@ tests/gtest-*.dll
 tests/test-*.dll
 tests/xml-*.xml
 tests/test-*.netmodule
-tests/gxml-*.xml
-tests/test-*.xml
 tests/data.xml
 class/Mono.Data.Sqlite/test.db
 class/Mono.CSharp/Mono.CSharp.dll.sources
index 79e915b3f1db1cb74cb7ad67d3ff2c7812e40277..8d7afc74a6ebcc125a85053aeea26acbca0d8638 100644 (file)
@@ -321,6 +321,17 @@ namespace Mono.CSharp {
                        int index = identifier.LastIndexOf ('.');
                        if (index < 0)
                                return null;
+
+                       var nsName = identifier.Substring (0, index);
+                       var typeName = identifier.Substring (index + 1);
+                       Namespace ns = ds.NamespaceEntry.NS.GetNamespace (nsName, false);
+                       ns = ns ?? mc.Compiler.GlobalRootNamespace.GetNamespace(nsName, false);
+                       if (ns != null) {
+                               var te = ns.LookupType(mc.Compiler, typeName, 0, true, mc.Location);
+                               if(te != null)
+                                       return te.Type;
+                       }
+
                        int warn;
                        TypeSpec parent = FindDocumentedType (mc, identifier.Substring (0, index), ds, cref, r);
                        if (parent == null)
diff --git a/mcs/tests/test-xml-55-ref.xml b/mcs/tests/test-xml-55-ref.xml
new file mode 100644 (file)
index 0000000..0501dfa
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>test-xml-55</name>
+    </assembly>
+    <members>
+        <member name="T:NAnt.Core.Filters.FilterChain">
+            <summary>
+            Represent a chain of NAnt filters that can be applied to a 'Task'.
+            </summary>
+            <remarks>
+            <list type="bullet">
+              <item>
+                  <description><see cref="T:NAnt.Core.Tasks.CopyTask"/></description>
+              </item>
+            </list>
+            </remarks>
+        </member>
+        <member name="T:NAnt.Core.Tasks.CopyTask">
+            <summary>
+            Copies a file or set of files to a new file or directory.
+            </summary>
+        </member>
+    </members>
+</doc>
diff --git a/mcs/tests/test-xml-55.cs b/mcs/tests/test-xml-55.cs
new file mode 100644 (file)
index 0000000..814802b
--- /dev/null
@@ -0,0 +1,29 @@
+// Compiler options: -doc:xml-055.xml -warnaserror
+
+namespace NAnt.Core.Filters
+{
+       /// <summary>
+       /// Represent a chain of NAnt filters that can be applied to a 'Task'.
+       /// </summary>
+       /// <remarks>
+       /// <list type="bullet">
+       ///   <item>
+       ///       <description><see cref="NAnt.Core.Tasks.CopyTask"/></description>
+       ///   </item>
+       /// </list>
+       /// </remarks>
+       public class FilterChain
+       {
+               static void Main ()
+               {
+               }
+       }
+}
+
+namespace NAnt.Core.Tasks
+{
+       /// <summary>
+       /// Copies a file or set of files to a new file or directory.
+       /// </summary>
+       public class CopyTask { }
+}