[MonoDevelop] Goto class patch

Jacob Ilsø Christensen jacobilsoe at gmail.com
Wed May 18 14:25:48 EDT 2005


On 5/18/05, Lluis Sanchez <lluis at ximian.com> wrote:
> > Hmm, I think I will give an example of what I mean. Suppose you have this code:
> >
> > 1: int i;
> > 2: int j;
> > 3:
> > 4: i = 7;
> >
> > If you position your cursor on i on line 4, I want a method which
> > gives me the element at line 1. From this element I could then extract
> > the position via the Region property. So I need a method which should
> > do something like: "give me the declaring element". This method would
> > get the string i as argument and return the IField (or whatever it is
> > called) object for line 1. Is this not what we need?
> 
> Yeah, that's it. It would return an IField if 'i' is a field, and we
> probably need something like IVariable for when 'i' is a variable. It
> should also return an IClass if the cursor is on "int".
> 

Exactly. We agree then :-) There is just one thing. I would like the
method to return some well defined interface. This could be some
ILocation interface (containing a Region member) which IClass,
IProperty etc. would implement. The only issue is whether this
interface should define things to be used for the tool tip
functionality as well?

/Jacob

> >
> > > >
> > > > We could then add some code to get the type as well. But if I am not
> > > > wrong, the MonodocResolver does this job. So maybe we should use this
> > > > (and possibly rename it) for the tool tip functionality?
> > >
> > > I'm not sure to understand. The GotoDefinitionResolver method in your
> > > patch returns an IClass, that is, a type. If MonodocResolver does the
> > > same, there is no need for a new one (after renaming MonodocResolver of
> > > course).
> >
> > It is true that the GotoDefinitionResolver method returns an IClass,
> > but the patch was only intended as a demonstration to see if people
> > agreed that such functionality was needed in MD. It should not return
> > an IClass but something more general.
> 
> Agreed.
> 
> Lluis.
> 
>


More information about the Monodevelop-list mailing list