[MonoDevelop] Re: MonoDoc and jumping to declaration

Jacob Ilsø Christensen jacobilsoe at gmail.com
Mon May 23 06:14:33 EDT 2005


Hi.

On 5/23/05, Lluis Sanchez <lluis at ximian.com> wrote:
> Hi,
> 
> >
> > So I have decided to create an interface named ISourceCodeElement
> > instead and follow the following list of steps:
> >
> > 1. Create an empty interface named ISourceCodeElement and have
> > IProperty, IMethod etc. implement it.
> > 2. Add a IReturnType property to ISourceCodeElement
> > 3. Use ISourceCodeElements instead of IReturnType in the Resolve and
> > TypeVisitor classes.
> > 4. Add a MonoDocReference string property to ISourceCodeElement. So an
> > object implementing the IProperty for a property Prop in a namespace
> > NS would return the string "P:NS.Prop".
> > 5. Add an IRegion property to ISourceCodeElement. This would help
> > implement the goto declaration functionality.
> > 6. Add a ToolTip string property to ISourceCodeElement. This will
> > implement the tool tip functionality.
> >
> > Does this sound like the way to go?
> 
> I agree with 1,2,3 and 5, but not with 4 and 6. The Monodoc service has
> enough information to build the help string by itself. The same for the
> tooltips.
> 

What Monodoc service it that? From what I have seen in the code, a
string is just returned now which is hardcoded to "T:thetypename".
What I would like to do is to move this functionality to the type
itself, since it is the IProperty that knows that a P: should be
prepended and likewise for the other members. Is there some
functionality I have not found?

/Jacob

> >
> > /Jacob
> >
> > On 5/22/05, Jacob Ilsø Christensen <jacobilsoe at gmail.com> wrote:
> > > Hi.
> > >
> > > I am currently working on complete monodoc functionality as well as
> > > providing functionality to jump to the declaration of a given use of a
> > > variable in a source file.
> > >
> > > With the current Resolver class this is not easily done since it uses
> > > the ReturnType class (which basically equals a fully qualified name)
> > > all over the place. I have been coding a bit and have many parts of
> > > the monodoc functionality working, but it all ends up with a lot of
> > > code duplication which is NOT very nice.
> > >
> > > So... I am thinking about changing the Resolver class as well as the
> > > TypeVisitor class to return a new class (instead of ReturnType) with
> > > more information than what the ReturnType class currently contains.
> > > This informatin should include:
> > >
> > > The type of member (method, event, class, property etc.): this will be
> > > useful for tool tips as well as generating monodoc references.
> > >
> > > The location: this will be useful for the jump to declaration functionality.
> > >
> > > And possibly more.
> > >
> > > I think this is the way it should be done, but I am a bit worried that
> > > a LOT of code needs to be changed in order to prepare for this new
> > > functionality. Does anyone with more insight in these specific classes
> > > have any comments, suggestions for another solution, or do you think
> > > this is the way to go?
> > >
> > > /Jacob
> > >
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-list
> 
> _______________________________________________
> 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