[Mono-list] About intellisense, mono, emacs
Jonathan Pryor
jonpryor@vt.edu
17 Apr 2003 15:16:48 -0400
If only it were that simple...
The closest "match" to a C header file is the assembly, which is also
the closest match to a C shared library. :-)
So in principal what you're asking has a simple answer: use
Ssytem.Reflection to list all the classes, members, properties, etc.,
and add these to some data structure.
There's two problems with this. First, to be truly useful you need to
know what assemblies the user will be referencing. This isn't kept in
the source file, but in the build system, so getting the list of
assemblies may not be trivial.
Second of all is *speed*. Reflection isn't blazing fast; it takes a
good 30 seconds (or more!) to run the Gtk# treeviewdemo.exe, which uses
reflection against all assemblies it can find to list all classes and
their members. (This is on my laptop, which isn't the fastest machine
running around.) (As a shameless plug, Type Reflector can do the same
thing much faster, but it uses lazy evaluation to achieve the perceived
speed increase.)
Instead, you might want to look at what #Develop does:
http://www.icsharpcode.net/OpenSource/SD/Tour/094/CodeCompletion.aspx
- Jon
On Thu, 2003-04-17 at 14:47, Maurizio Colucci wrote:
> Hi,
>
>
> I am new to mono, but have a fair experience with Visual Studio.NET
> and emacs.
>
> If one were to program a plugin for emacs which provides intellisense
> (*), where would he find the declaration of members?
>
> In other words: in C source code
>
> #include <string.h>
>
> main(){
> ...
> }
>
> you just have to parse /usr/include/string.h. You "just" need to parse
> the files mentioned in the include directives.
>
> In C#, where can I find the declarations of classes, properties,
> member functions, etc?
>
> ---
> By intellisense I mean:
>
> 1. automatically showing the members of the class when you press the
> dot. Only members you have the right to access should be displayed,
> i.e. only static if you are static, only public if you are outside,
> etc.
>
> 2. automatically showing the parameters when you press the (.
>
>
> Thank you,
>
> Maurizio
>
>
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list