DESCRIPTION

Don't compute repository for selection, use RepositorySourceProvider

Since we now always have an up-to-date "selected" repository, we should
use this and do not evaluate for each and every selection dependent
handler.

Change-Id: I0bc7aee39f81ded6d96d26131417ff863f62eefd
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2016-01-08 09:22:41.000000000

Patch Set 9:

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

-------------------------------------
author: Brenden Conley
date: 2016-01-08 09:47:18.000000000

Patch Set 9: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2016-01-08 12:26:00.000000000

Patch Set 9:

(2 comments)

This change mixes two things:

* Fixing the handling of text selections in the RepositorySourceProviderso that GitFlow submenu entries work correctly in the context menu of editors.
* Using the "current" repository from the RepositorySourceProvider in the rest of EGit.

The latter was something I had planned, too -- which was my reason for placing the RepositorySourceProvider in egit.ui and not in the gitflow.ui bundle ;-).

Can't we split that; or even better, include the text selection fix in I60aac46 so that that change becomes a complete solution?

Line:277, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/selection/RepositorySourceProvider.java -> Why this duplication? Why not just call SelectionUtils.getRepository(selection)?

Line:55, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/selection/SelectionUtils.java -> Order of modifiers is usually "private static".

-------------------------------------
author: Alayna Houston
date: 2016-01-11 08:31:01.000000000

Patch Set 9:

(1 comment)

Line:87, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/resources/ResourceStatePropertyTester.java -> I do wonder... the RepositorySourceProvider gets triggered by a selectionChangeEvent. So is the re-evaluation of tests based on the current selection, such as this one. We can be sure to get the correct repository here only if we can be sure that the RepositorySourceProvider gets triggered first. How do we guarantee that? Would we have to change the RepositorySourceProvider to provide a combined result (current selection plus current repo derived from it) and use that consistently throughout? Or am I missing something?

-------------------------------------
author: Jayvion Booth
date: 2016-07-13 09:32:03.000000000

Abandoned

Outdated

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