DESCRIPTION

Warn when switching branches and a launch is running for the repo

On certain cumbersome platforms (looking at you, Windows), a branch
switch may fail when something is running that uses the files. In case
of launch configurations inside Eclipse, we can detect that and warn the
user about it.

We could even offer to terminate it, but as termination may be async, we
just offer continue/cancel. The user can also choose to not show any
warnings again.

The code for detecing this searches the ISourceContainer of the launches
to see if one is for a project of the repository. This works e.g. for
"Java Application" run configurations and also for servers (WST). I
first tried ILaunchConfiguration#getMappedResources, but it does not
return anything for servers. Maybe there is an easier way, but I
couldn't find it.

See bug for how to test this with servers.

Bug: 419296
Change-Id: I2fd7459b0cf342c13dda087745bd68dc1b6da4c3
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-10-16 21:00:50.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/5027/

-------------------------------------
author: Brenden Conley
date: 2013-10-16 21:22:14.000000000

Patch Set 2: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/5027/ : UNSTABLE

-------------------------------------
author: Juliet Cantu
date: 2013-10-20 16:35:21.000000000

Patch Set 2: Code-Review+1 IP-Clean+1

I haven't tried it, but the idea is sane, I think.

-------------------------------------
author: Douglas Trujillo
date: 2014-02-14 15:20:26.000000000

Patch Set 2:

should we move this for 3.3 ?

-------------------------------------
author: Danika Greer
date: 2014-02-14 15:42:19.000000000

Patch Set 2:

Not sure, I think it could benefit from longer testing. So merging it early for the next release might be better.

-------------------------------------
