[MonoDevelop] Generics support - Part 2 (PATCH)

Lluis Sanchez lluis at ximian.com
Mon Jul 24 07:58:59 EDT 2006

Some comments:
      * Forcing all language bindings and other parser users to link
        against Cecil just to be able to reuse one enum is not a good
        deal. We don't really need that dependency.
      * In ReflectionReturnType.cs, maybe you should set the arrays
        ArrayList to null once it has been converted to an int[], since
        it won't be needed anymore.

other than that, the patch looks great. More comments inline.

> Discussion:
> You will notice, that generic types have a '`#' appended to their names.
> Since Alejandro and Miguel have pointed out that this is the standard
> naming convention of CLS (and it sure makes perfect sence), I have
> decided that FullyQualifiedNames MUST preserve this naming convention.
> But since language bindings don't understand this naming convention (and
> since MonoDevelop's code completion doesn't trim the aforementioned
> suffix) MonoDevelop doesn't recognize generic types, and hence members
> for all generic types are invisible for now. (Note that generic members
> of non-generic types ARE visible already...)
> To solve this, I suggest the following (a short term solution):
> - we introduce a new method in IAmbience - namely 'string
> ConvertName(IClass)', which only removes the suffix and perhaps adds the
> generic parameters (e.g.: enclosed in '<' and '>' for C#).

I think that by providing the correct ConversionFlags combination we can
already get this text using the existing 'Convert' method. And if not,
maybe we should add new flags.

> - we introduce a new property in the CodeCompletionWindow which contains
> the correct 'completionString'. Now, it seems, that MonoDevelop uses the
> string which is used in the code completion popup to display names, but
> the problem is that characters '<' and '>' get replaced by '&lt;' and
> '&gt;' - which makes no sense in the SourceEditor...

This looks like a bug. I don't see the need of using the pango formatted
text in the completion window. We should check what's wrong there.


More information about the Monodevelop-list mailing list