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

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

From: Irving, Dave <dave.irving_at_logicacmg.com>
Date: 2006-04-25 11:20:19 CEST

Hi,

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

     

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: dev-help@subclipse.tigris.org

Received on Tue Apr 25 11:20:45 2006

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.