DESCRIPTION

Fix SWTException: invalid thread access

Bug: 461468
Change-Id: I49d8e856393d35ecf10fe63280541f2cd109fffa
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2015-03-05 08:46:49.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-03-05 08:46:57.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2015-03-05 09:02:50.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2015-03-05 09:07:57.000000000

Patch Set 1: Code-Review-1

(1 comment)

See comment in code.

Line:112, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/merge/GitMergeEditorInput.java -> I would prefer not to call syncExec() from getAdapter(). 
getAdapter() can be called from any thread and the problem could be that the calling thread deadlocks because UI thread is already busy.

I would propose to check IF we are in the UI thread or not, and only call into the getSelectedEdition() if we are in UI.

BTW we should use PlatformUI.getWorkbench().getDisplay() for that.

-------------------------------------
author: Douglas Trujillo
date: 2015-03-05 13:02:15.000000000

Patch Set 1:

(1 comment)

Line:112, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/merge/GitMergeEditorInput.java -> Done

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