[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-dev] Revision Graph

From: Steve Elsemore <selsemore_at_collab.net>
Date: Mon, 06 Oct 2008 09:09:20 -0700

Thanks Alberto.

Don't worry about the outline view. I got that working.

But if you could look at the findRootNode() method, that would be great.

Thanks,
Steve

On 10/6/08 9:04 AM, "Alberto Gimeno" <gimenete_at_gmail.com> wrote:

> Hi Steve.
>
> Sorry for the late response, but I'm on holidays until nex week :)
> Nevertheless until friday I have a computer and Internet connection.
>
> I copied the 10,000 foot outline view from the IBM red book about GEF and EMF
> (page 131, http://www.redbooks.ibm.com/abstracts/sg246302.html).
> The implementation is inside
> org.tigris.subversion.subclipse.graph.editors.OverviewOutlinePage
> and is supposed to be discovered by Eclipse when it calls this method:
>
> [class RevisionGraphEditor]
>
> public Object getAdapter(Class adapter) {
> if(adapter == GraphicalViewer.class ||
> adapter == EditPartViewer.class) {
> return viewer;
> } else if(adapter == ZoomManager.class) {
> return ((ScalableRootEditPart) viewer.getRootEditPart()).getZoomManager();
> } else if (adapter == IContentOutlinePage.class) {
> return getOverviewOutlinePage(); // HERE
> }
> return super.getAdapter(adapter);
> }
>
> I don't know why but it doesn't work. There is no error though, just
> the Outline view says "there is no outline view available". I have
> tried adding "implements IAdaptable" to RevisionGraphEditor, but it
> still doesn't work.
>
> I'll take a look at findRootNode() and I'll document it and try to
> reproduce the infinite loop. This method looks for the first time the
> file was created. It reads the repository backwards from HEAD to the
> first revision. If the selected file is /branches/a/foo.txt and the
> repository is this:
>
> ...
> rev3
> A /trunk/foo.txt
> rev4
> M /trunk/foo.txt
> rev5
> A /branches/a/foo.txt from /trunk/foo.txt
> rev6
> M /branches/a/foo.txt
>
> Then this method should find that "rev3 A /trunk/foo.txt" is the root
> node. So this method is only interested on 'A' actions. And it makes
> different things if the copySrcPath is null or not. I'll explain it on
> the code.
>
>
> On Wed, Oct 1, 2008 at 2:01 AM, Mark Phippard <markphip_at_gmail.com> wrote:
>> On Tue, Sep 30, 2008 at 6:35 PM, Steve Elsemore <selsemore_at_collab.net> wrote:
>>
>>> If you have the time, one thing that would be helpful would be if you have
>>> time to take a look at the Cache.findRootNode method. I've run into
>>> situations where this method has gotten into a loop and the graph has never
>>> displayed. I think it happens when you try to open the revision graph for a
>>> file that is checked out from a local (file:///) repository, but I'm not
>>> sure. The method is a little hard to read/debug with the nested loops,
>>> breaks, returns. Anything you could do to make it more maintainable while
>>> it's still fresh in your mind (even if it's just adding some comments) would
>>> be helpful.
>>
>> I see this with an http checkout too. So it is not because of file://
>>
>> --
>> Thanks
>>
>> Mark Phippard
>> http://markphip.blogspot.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_subclipse.tigris.org
>> For additional commands, e-mail: dev-help_at_subclipse.tigris.org
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subclipse.tigris.org
For additional commands, e-mail: dev-help_at_subclipse.tigris.org
Received on 2008-10-06 18:09:31 CEST

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.