[MonoDevelop] monodoc patch

Lluis Sanchez lluis at ximian.com
Thu Jun 2 14:40:55 EDT 2005


> Hi.
> 
> I have been looking a bit more on the issues you found.
> Now SearchMember takes an IClass

Will this work for arrays?

>  as argument and IParameter implements
> ISourceCodeElement.
> 
> I still use SourceCodeElement in two places though...
> 
> For LocalLookupVariable and System.Array.
> - LocalLookupVariable could easily implement ISourceCodeElement, but
> the class resides in the  ICSharpCode.SharpRefactory assembly and I
> guess we do not want that to reference a MD assembly?

I'm not sure what is this needed for, but you could create a new
ILocalVariable interface + class that also implements
ISourceCodeElement.

> - System.Array is returned when the type currently looked at has a
> positive ArrayDimensions. There is no real object at hand to use which
> could implement ISourceCodeElement...

So we are back to the original problem. The problem is that there is no
interface that represents a Type: a type can be a class, an array or
whatever a CLR Type can be. So the solution is to create this new IType
interface (or rename/extend IClass to include the missing
functionality). However, this will require a lot of refactoring, since
it will probably replace IReturnType.

> 
> Any good ideas? :-)
> 
> /Jacob
> 
> 
> 
> On 6/1/05, Lluis Sanchez <lluis at ximian.com> wrote:
> > Hi,
> > 
> > Some comments:
> > 
> > - public IReturnType SearchMember(IReturnType type, string memberName)
> > + public ISourceCodeElement SearchMember(ISourceCodeElement type, string
> > memberName)
> > 
> > Why does the type parameter need to be a ISourceCodeElement? It doesn't
> > make sense to me. Only types can have members.
> > 
> > Why is the SourceCodeElement class needed? Looks like a very ambiguous
> > class to me. I see it being used in SearchMethodParameter(). Maybe
> > IParameter should implement ISourceCodeElement?
> > 
> > I hope the refactoring will include removing the MonodocResolver method.
> > We really don't need it if the Resolve can return an ISourceCodeElement
> > inside the ResolveResult object.
> > 
> > Other than that, I think the patch is going to the right direction.
> > 
> > Lluis.
> > 
> > El dt 31 de 05 del 2005 a les 21:29 +0200, en/na Jacob Ilsø Christensen
> > va escriure:
> > > Hi.
> > >
> > > I finally made the patch which generalizes the resolver and
> > > typevisitor to allow for complete monodoc support as well as goto
> > > declaration.
> > >
> > > It still needs some refactoring and cleaning up, but the basic
> > > functionality should more or less be in place. I have made monodoc
> > > support for properties and fields. I have not made goto declaration
> > > yet, but that one is easy now and I will do that next.
> > >
> > > Will someone look through the patch as I would like to commit this and
> > > then refactor afterwards so the patch won't be too big (I know the
> > > ChangeLogs are missing but I will add them as appropriate).
> > >
> > > After this I will make goto declaration. Then:
> > >
> > > - fix some bugs with local variables
> > > - support for methods
> > >
> > > Then I would like to introduce some on-the-fly syntax checking. Is
> > > that something we want for MD?
> > >
> > > Then more navigation and then possibly refactoring support.
> > >
> > > /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