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

Re: [Subclipse-dev] Delay when right-clicking / double clicking History ChangePaths Viewer resolved

From: Mark Phippard <markp_at_softlanding.com>
Date: 2006-04-25 14:59:02 CEST

Look good. Committed in r2197.



"Irving, Dave" <dave.irving@logicacmg.com> wrote on 04/25/2006 05:20:19

> So, I've been working on adding a context menu to the change paths
> viewer to allow individual paths to have their own logs opened in the
> history viewer.
> One thing I ran in to very quickly - and which I believe has been
> mentioned on this list before - is the long delay which occurs between a
> right click in the change paths viewer and the context menu actually
> appearing.
> After a few hours of tearing my hair out, I finally got to the bottom of
> it. The eclipse internals try to do some default legacy adaptations of
> selected items when building a menu bar (see
> org.eclipse.ui.internal.PopupMenuExtender#menuAboutToShow /
> org.eclipse.ui.internal.ObjectActionContributionManager).
> So, right clicking a change path viewer table causes the selected
> LogEntryChangePath to be asked to adapt to the following types:
> interface org.eclipse.ui.IContributorResourceAdapter
> interface org.eclipse.core.resources.IResource
> interface org.eclipse.ui.IContributorResourceAdapter
> class org.eclipse.core.resources.mapping.ResourceMapping
> interface org.eclipse.ui.IContributorResourceAdapter
> interface org.eclipse.core.resources.Iresource
> The problem is that LogEntryChangePath seems to optimistically assume it
> will be asked to adapt to a remote resource - so gets the remote
> resource if it hasn't got it already (network call) and -- then --
> checks the type against the requested adaptation type.
> The net result is that a right click causes us to fetch the remote
> resource "too early" - yielding a user interface lag.
> I've attached a patch to fix this up. What I do is first see whether it
> is at all possible that we could be adapting to a remote resoure (check
> for assignment compatability to ISVNRemoteResource). If this is the
> case, we proceed as normal: Get the resource and then check the actual
> type for compatability to the requested adaptation type.
> Otherwise we just delegate to the base.
> Let me know if this is ok,
> Cheers,
> Dave

Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.

To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: dev-help@subclipse.tigris.org
Received on Tue Apr 25 14:59:10 2006

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