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

Re: [Subclipse-users] OT (was: Re: [Subclipse-users] Copy and paste of folder problem)

From: Mark Phippard <markp_at_softlanding.com>
Date: 2006-01-23 15:01:56 CET

Denny Valliant <valliant@unm.edu> wrote on 01/21/2006 09:42:35 PM:

> After more reflection, I'm not so worried about the copy/paste. As I
> think Mark pointed out, the same thing happens if you just run a file
> system copy/paste (.svn is included unless you do something extra) so
> what's the big deal. If you do it in the right view, you're cool. Which
> is kinda how it should be actually(...|?)
>
> It would be really nice to be able to hook something tho, and pop up an
> alert. I know there are problems hooking copy, but what about paste[1]?

Eclipse has something called "Resource change listeners". Basically it
allows you to register with Eclipse that you want to be notified about any
modifications to the workspace. We use these in Subclipse to do things
like refresh decorators. This is about the only way you could do this,
and is what the CVS developers recommended. There are a number of
problems/complications with this approach.

These listeners are notified of every change, so you have to be careful to
keep the code that runs in the listener fast and lightweight. The
listener is given a fairly complicated change delta that you have to
interpret. You would have to somehow figure out that a copy has occurred.
 I am not sure how you would be able to differentiate a copy from any
number of other changes that will have a similar looking delta. The main
thing is that whatever you do has to run reasonably fast. Finally, it can
be tricky to add any UI from these processes. I think as long as you wrap
it in a SyncExec it works OK. In the ideal world, you would not need any
UI.

Hope this helps.

Mark

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Mon Jan 23 15:14:24 2006

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

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