2005-12-23 Miguel de Icaza <miguel@novell.com>
[mono.git] / mcs / mcs / doc.cs
index 843904a0327cc7cd1df6fc8dd28f2aaf1223d452..8f0d14fbce42aa7dc0b6a3a2be63be8d826aacae 100644 (file)
@@ -383,22 +383,9 @@ namespace Mono.CSharp {
                {
                        if (ml == null)
                                return empty_member_infos;
-                       if (type.IsInterface)
-                               return ml;
 
                        ArrayList al = new ArrayList (ml.Length);
                        for (int i = 0; i < ml.Length; i++) {
-                               // Interface methods which are returned
-                               // from the filter must exist in the 
-                               // target type (if there is only a 
-                               // private implementation, then the 
-                               // filter should not return it.)
-                               // This filtering is required to 
-                               // deambiguate results.
-                               //
-                               // It is common to properties, so check it here.
-                               if (ml [i].DeclaringType.IsInterface)
-                                       continue;
                                MethodBase mx = ml [i] as MethodBase;
                                PropertyInfo px = ml [i] as PropertyInfo;
                                if (mx != null || px != null) {
@@ -718,12 +705,6 @@ namespace Mono.CSharp {
                                return; // a type
                        }
 
-                       // don't use identifier here. System[] is not alloed.
-                       if (RootNamespace.Global.IsNamespace (name)) {
-                               xref.SetAttribute ("cref", "N:" + name);
-                               return; // a namespace
-                       }
-
                        int period = name.LastIndexOf ('.');
                        if (period > 0) {
                                string typeName = name.Substring (0, period);
@@ -762,6 +743,17 @@ namespace Mono.CSharp {
                                }
                        }
 
+                       // It still might be part of namespace name.
+                       Namespace ns = ds.NamespaceEntry.NS.GetNamespace (name, false);
+                       if (ns != null) {
+                               xref.SetAttribute ("cref", "N:" + ns.FullName);
+                               return; // a namespace
+                       }
+                       if (RootNamespace.Global.IsNamespace (name)) {
+                               xref.SetAttribute ("cref", "N:" + name);
+                               return; // a namespace
+                       }
+
                        Report.Warning (1574, 1, mc.Location, "XML comment on `{0}' has cref attribute `{1}' that could not be resolved",
                                mc.GetSignatureForError (), cref);