DESCRIPTION

RepositoryAction: Only calculate isEnabled if relevant selection changes

When selecting text in a text editor or moving the cursor,
selectionChanged is called many times with an ITextSelection.

In case of a text selection, we are only interested in which file the
selection is in. To get rid of some unnecessary cycles, only calculate
isEnabled if the selection changed after the interesting parts are
extracted.

Bug: 415958
Change-Id: I52416d0386a60d15b19d0a32755b016c2f3419eb
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-08-27 14:37:57.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/135/

-------------------------------------
author: Brenden Conley
date: 2013-08-27 14:39:32.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/135/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2013-08-27 14:59:07.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/136/

-------------------------------------
author: Brenden Conley
date: 2013-08-27 15:11:52.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/136/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2013-08-27 15:34:02.000000000

Patch Set 1: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/137/

-------------------------------------
author: Juliet Cantu
date: 2013-08-27 15:45:31.000000000

Patch Set 1: Code-Review-1

What if the user switches to cli, changes the repository and switches back?

-------------------------------------
author: Brenden Conley
date: 2013-08-27 15:46:35.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/137/ : UNSTABLE

-------------------------------------
author: Danika Greer
date: 2013-08-27 15:58:09.000000000

Patch Set 1:

> What if the user switches to cli, changes the repository and switches back?

selectionChanged is not called in that case, even before this change. Just tried that out by adding a print at the start of selectionChanged.

-------------------------------------
author: Douglas Trujillo
date: 2013-08-29 23:38:41.000000000

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

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