[MonoDevelop] Re: MonoDoc and jumping to declaration
Jacob Ilsø Christensen
jacobilsoe at gmail.com
Mon May 23 02:10:14 EDT 2005
Hi.
I have been looking at extending the ReturnType class. This will lead
to massive code updated in the code completion persistance parts as
well as a lot of other places. Since we have no unit tests to rely
upon I am very reluctant to do this.
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?
/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
>
More information about the Monodevelop-list
mailing list