[MonoDevelop] Goto class patch

Lluis Sanchez lluis at ximian.com
Wed May 18 13:19:05 EDT 2005


On dc, 2005-05-18 at 18:46 +0200, Jacob Ilsø Christensen wrote:
> Hi.
> 
> I agree that the name might not be the best, but the patch is still
> under development so I have not decided yet.
> 
> I am not sure it should be: "get me what's at that position". I think
> it should be something like: "give me the position where the element
> at the current position is declared". At least that was the intended
> functionality when the patch is completed.

Yeah, that's the intended functionality for the "Go to definition"
command. But to implement this command a "give me the element at that
position" method in IParserService (and in IParser) should be enough.
You can get the position where the element is declared from the element
itself (e.g. IClass.Region).

> 
> 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).

Lluis.

> 
> /Jacob
> 
> On 5/18/05, Lluis Sanchez <lluis at ximian.com> wrote:
> > Please, don't use GotoDefinitionResolver for the method name. Think
> > about a more generic name since the same method may be used for purposes
> > other than "Goto definition" (for example, for showing class info in a
> > tooltip).
> > 
> > I think that the method should also be more generic and should return
> > whatever is present at the given file position (it could be a type, but
> > also a variable reference, or a method call).
> > 
> > it sould be a "get me what's at that position"
> > 
> > On dj, 2005-05-12 at 21:21 +0200, Jacob Ilsø Christensen wrote:
> > > Hi.
> > >
> > > I have attached a patch which lets you jump to a class definition. If
> > > you position the cursor on a class name, and hit Ctrl+. (hardcoded for
> > > now) the editor will jump to the definition of that class.
> > >
> > > The code is very proof-of-concept-like :-) It definately needs some
> > > refactoring and cleaning up. I just wanted someone to try it out and
> > > firstly see if it works and secondly let me know if this is desired
> > > functionality.
> > >
> > > So let me know, if I should add more functionality like methods,
> > > fields, etc. or maybe do thing another way?
> > >
> > > /Jacob
> > 
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-list
> >



More information about the Monodevelop-list mailing list