[MonoDevelop] Parser and code completion

Lluis Sanchez lluis at ximian.com
Sun Jun 11 14:17:08 EDT 2006


El ds 10 de 06 del 2006 a les 11:55 +0200, en/na Matej Urbas va
escriure:
> Hi
> 
> I've been contemplating both the GUI and the parser parts of code
> completion (i.e. MonoDevelop.Projects.Gui.Completion and
> MonoDevelop.Projects.Parser).

That's great!

> 
> Firstly:
>         It seems to me that fixing the 'Parser' part will not be a big
>         problem. The following code should be added:
>         in IClass:
>         StringCollection GenericParameters {
>             get;
>         }

What about type constraints? We should also have this information.

>         
>         in IMethod:
>         StringCollection GenericParameters {
>             get;
>         }
>         
>         in IReturnType:
>         StringCollection GenericArguments {
>             get;
>         }

Shouldn't this return a collection of IReturnType?

>         
>         in IParameter:
>         StringCollection GenericArguments {
>             get;
>         }

I'm also wondering if IClass.BaseTypes should now be a list of
IReturnType instead of a list of String, since base types can now have
generic arguments.

>         
>         The GenericParameters property provides virtual names of the
>         generic types, where on the other hand GenericArguments
>         property provides actual types for them. A class/method
>         indicates with non-null and non-empty generic parameter list
>         that it is generic.
>         
>         In code completion an instance of a generic type should have
>         its virtual generic parameters replaced with its actual ones.
>         
>         Should I proceed with adding above code or is there still
>         something I have missed?
>         
>         Should I also modify language bindings to accommodate upper
>         changes?

Yes, changes in the language bindings should be included in the patch to
avoid breaking the build when it is committed.

> 
> Secondly:
>         I'm not entirely sure yet, but I think that adding support for
>         the requested code completion features (especially snippets,
>         keyword completion etc.) will be much more of a problem. For
>         now it seems to me that I will have to rework a large part of
>         MonoDevelop.Projects.Gui.Completion. What is your opinion
>         about that?

Isn't a custom implementation of ICompletionData or
ICompletionDataProvider enough for what you want to do?

>         
>         Well, I still don't have enough insight to add any
>         functionality... However, at this stage I'm carefully
>         investigating things and I'm already building a document with
>         which I will not only try to describe desired functionality of
>         code completion, but hopefully also document the entire code
>         completion architecture so that developers will have an easy
>         time adding new functionality.
>         
>         As soon as I have the first draft of the document, I will post
>         it here.

That would be awesome.

Thanks,
Lluis.




More information about the Monodevelop-list mailing list