[Monodevelop-devel] Intellisense for delegate types
Daniel Gutierrez
dani.gutierrez at gmail.com
Tue Jun 8 08:29:37 EDT 2010
Hello,
I noticed that MD 2.4 intellisense doesn't show the members for delegates
but only the inherited from System.Object. So I compiled MD and decide that
*CSharpTextEditorCompletion.CreateCompletionData() *would be a good start to
improve this functionality (I didn't see any open issue or bug regarding
this in the lists). So far I added something like:
CSharpAmbience ambience = new CSharpAmbience ();
IType type = dom.GetType (resolveResult.ResolvedType);
string strType = ambience.GetString (type,
OutputFlags.ReformatDelegates | OutputFlags.IncludeParameterName |
OutputFlags.IncludeKeywords | OutputFlags.UseFullName);
Console.WriteLine("Type is " + strType);
if (strType.StartsWith("delegate"))
{
type.BaseType = new
DomReturnType("System.MulticastDelegate");
}
in the mentioned method just to see if that works (and somehow it does). Of
course is not the solution because:
- I think that the type should be assigned while the DOM structure is
created and not in that method.
- It doesn't generate (or simulate) the sealed class with the
members *BeginInvoke(),
EndInvoke()*.
Right now I'm facing the first problem but honestly is a bit difficult to
work with the code since I don't clearly see how the classes interacts. So
the question is if you could briefly describe where do you think I should
make the first change (set the right DomReturnType to the delegates) or what
are the responsibilities of the classes involved in this functionality:
CSharpTextEditorCompletion, ProjectDom, Ambience, NRefactoryResolver,
ResolveResult
Thanks in advance,
D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-devel-list/attachments/20100608/9343345e/attachment.html
More information about the Monodevelop-devel-list
mailing list