DESCRIPTION

Fix focus restoration in CommitEditor pages

FormPage by default re-sets the focus to the first child of the
managed form. In the CommitEditorPage, this is not convenient;
it'll always set focus on the author indication. Add focus tracking
to identify the control currently having the focus so that it can
be re-focused when the page becomes active again after a page
change or editor de-activation.

Bug: 509486
Change-Id: I678bdfde9105d04669a42ad81502eb1064c470bc
Signed-off-by: Alayna Houston xxx@xxx.xxx
Also-by: Alayna Houston xxx@xxx.xxx
Signed-off-by: Dashawn Dalton xxx@xxx.xxx

COMMENTS

author: Dashawn Dalton
date: 2016-12-20 15:28:47.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2016-12-20 15:28:53.000000000

Patch Set 2:

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

-------------------------------------
author: Dashawn Dalton
date: 2016-12-20 15:33:55.000000000

Patch Set 2:

I already had all my suggested changes in my workspace, so I thought I could just as well push that. Unfortunately, Gerrit forced me to make myself the Author of the commit (because I'm not an EGit committer yet).

Note that change set 2 only fixes the initial focus issue and the null checks. There are still editor fields that are lacking focus tracking.

I'm done for now -- feel free to use this change set or not.

-------------------------------------
author: Alayna Houston
date: 2016-12-20 15:41:09.000000000

Patch Set 2:

(1 comment)

To completely fix this, I guess one needs to move that focus tracking and custom setFocus() into a custom ScrolledComposite set as the only child of the ManagedForm. Then we can leave the shared header to the standard implementation (which, however, will always set the focus on _its_ first child: the commit id), and deal with our own Controls locally.

Line:112, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/FocusTrackingFormPage.java -> This will mean we'll never re-focus an item from the shared header.

-------------------------------------
author: Brenden Conley
date: 2016-12-20 15:52:50.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2016-12-20 23:56:53.000000000

Patch Set 2: Code-Review-1

Thanks for the hint, but this needs more work. I'll give it another shot, and would appreciate comments then.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-12-22 22:17:07.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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