DESCRIPTION

RepositorySourceProvider: update selection in background job

Move selection update to a background job to prevent UI freezes.

See https://git.eclipse.org/r/#/c/63410/2/

Change-Id: I60aac4695fbc34fc99d193f76eb577c6a1890af5
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Jayvion Booth
date: 2016-01-06 13:34:46.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2016-01-06 13:34:53.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2016-01-06 14:00:26.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/8005/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2016-01-06 14:21:03.000000000

Patch Set 4: Code-Review-1

I've pushed the updated patch.
The problem with asynchronous execution is ... that it is asynchronous - e.g. if the job needs more time to calculate new repository, but selection changes in the meantime, clients may still see the "old" repository.

I think the RepositorySourceProvider has currently following problems:
1) as of today (in-sync) it is invoked on any selection change. This will be a big pain for everyone who uses IDE, has lot of repositories there and don't use gitflow at all.
2) if it is changed as proposed here (a-sync), it will sometimes deliver wrong data. Nothing one want to have.

So while I understand the original intent of introducing this code, I think the solution should be slightly different. I'm thinking about it right now.

-------------------------------------
author: Jayvion Booth
date: 2016-01-06 17:51:47.000000000

Patch Set 4:

So now the computation is in the background but the tester (and menus) will always see the right value if requested - they will need of course wait the first time, but at least it can cancel this.

I've disabled computation because of changed text selections now - this is an overkill. Selections in explorers etc will still work.

I'm still wondering if we should move this code to the gitflow plugin.

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