[MonoDevelop] Bugzilla Bug Bugzilla bug 57782

Todd Berman tberman at off.net
Thu Jun 2 20:25:55 EDT 2005


On Thu, 2005-06-02 at 22:42 +0200, Lluis Sanchez wrote:
> El dj 02 de 06 del 2005 a les 22:03 +0200, en/na Jacob Ilsø Christensen
> va escriure:
> > Hi.
> > 
> > On 6/2/05, Lluis Sanchez <lluis at ximian.com> wrote:
> > > El dj 02 de 06 del 2005 a les 21:24 +0200, en/na Jacob Ilsø Christensen
> > > va escriure:
> > > > Does this look better?
> > > 
> > > The patch looks fine. Just two comments.
> > > 1) I think you are missing a return after:
> > > this.ParentCombine.RemoveReferencesToProject(projectToRemove);
> > 
> > Hmm, maybe I don't understand what ParentCombines are, but do I not
> > need to iterate each parents projects or is it only the topmost parent
> > that needs to be iterated?
> 
> GetAllProjects recursively gets all projects below the combine, so
> running the remove loop for the root combine is enough to remove all
> references (that is, there is no need to do anything else after calling
> this.ParentCombine.RemoveReferencesToProject).


Regardless of that, you need to while over ParentCombine assigning
upwards until you get the true parent, as it is possible to have it
multiple levels deep, like:

if (ParentCombine != null) {
    Combine top_parent = ParentCombine;
    while (top_parent.ParentCombine != null) {
        top_parent = top_parent.ParentCombine;
    }
    top_parent.RemoveReferencesToProject
}

--Todd



More information about the Monodevelop-list mailing list