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

Re: [Subclipse-dev] Eclipse 3.1/3.2 Support

From: Denny Valliant <valliant_at_unm.edu>
Date: 2006-06-01 22:43:51 CEST

Mark Phippard wrote:
>
> It sounds like you are saying that you are inside a project that is either
> not connected to SVN, or perhaps is connected to CVS or some other system.
> You take the keyboard shortcut to do an SVN Commit.
>
> 1) As you indicated, ideally something would be done in Eclipse to
> disable to keyboard shortcut in this scenarion.

I thought that's what the filter in plugin.xml on the objectContribution
for IResource did, but apparently actions called via key-binding ignore
that filter?

>
> 2) Failing that, it seems like things are behaving correctly.
>
> Have you looked at what CVS is doing? It could be that it is activated
> too but is just "swalloing" the error so that you do not know it was ever
> invoked. If you could figure out that the latter was happening, then
> maybe you could at least stop trying to figure out how to do #1.

CVS is sneaky. They've created a "mappedResource" and applied all their
bindings/enablements to that. Seems pretty smart, they can probably
ignore most selection changes unless they occur on a "CVS" IResource,
vs. any IResource, or stuff like that.

I'll take another stroll through CVS source and see if I missed
anything, but from my last foray, I'd say they get around the issue with
these "mapped" resources, vs. straight IResources.

I've played around with the code, (I got the debugger running again),
and the action is correctly disabled when called on a non svn-linked
resource (it still gets executed when called via key-binding, even
though it's disabled), but if I check for action enablement within the
action, or around the selectionChanged/getSelectedResources, the action
never gets executed.

Basically the error occurs when we try to get the modified resources in
CommitAction. getRepository() returns null, and that gums 'er up. I've
tried returning an empty array of IResources, which got rid of the
error, but no key-bindings work after you try to use one on a non
svn-linked resource. No errors as to why it no longer works.

That's the part that sucks. After you get an error when trying a
key-bound action on a non svn resource, that key-binging becomes
disabled, even if you later select a svn resource. Otherwise I'd trap
the error, and move on.
The action still works from the menus.

It would be nice to be able to take care of this issue in TeamAction,
vs. in each action itself, but so far I've been unsuccessful (with
either approach).

If we figure this out I can go ahead and create bindings for the rest of
the commands, as so far it's just commit, update, and sync.

I've attached the latest code for this patch to issue #394 (thanks again
for cleanup/commission of the repo location export patch) so if anyone
feels the urge, it's there.

I'll keep you posted as to what I come up with, but I'm a little stuck,
so any advice or ideas of things to try are welcome!

Thanks,
:Denny

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: dev-help@subclipse.tigris.org
Received on Thu Jun 1 22:44:10 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.