DESCRIPTION

WIP: Show an error dialog if actions in "Clean repository" fail

Also convert event handlers to use functional style.

Bug: 519831
Change-Id: I5ce50b9c0cc8431890c427cf10ac19491d86604f
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2017-08-30 13:17:35.000000000

Uploaded patch set 1.

-------------------------------------
author: Douglas Trujillo
date: 2017-08-30 13:18:47.000000000

Patch Set 1:

(1 comment)

Line:261, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clean/CleanRepositoryPage.java -> any idea why this doesn't show an error dialog ?

-------------------------------------
author: Brenden Conley
date: 2017-08-30 14:22:20.000000000

Patch Set 1:

Build Started https://ci.eclipse.org/egit/job/egit.gerrit/10121/

-------------------------------------
author: Brenden Conley
date: 2017-08-30 14:52:27.000000000

Patch Set 1: Verified+1

Build Successful 

https://ci.eclipse.org/egit/job/egit.gerrit/10121/ : SUCCESS

-------------------------------------
author: Jack Yu
date: 2017-08-30 15:55:53.000000000

Patch Set 1: Code-Review-1

(1 comment)

Line:261, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clean/CleanRepositoryPage.java -> getContainer().run() executes a runnable, and the exception goes there. When debugging, you end up in ModalContext.java, line 121 with your JGitException wrapped in the InvocationTargetException.

-------------------------------------
author: Douglas Trujillo
date: 2017-08-30 16:02:29.000000000

Patch Set 1:

(1 comment)

Line:261, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clean/CleanRepositoryPage.java -> yes, but when debugging I also see that finally I end up here in line 261 with the same InvocationTargetException

-------------------------------------
author: Jack Yu
date: 2017-08-31 06:26:01.000000000

Patch Set 1: -Code-Review

The dialog is there, but seems to be closed immediately with the wizard together. Put a break point in org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.doAddStatusAdapter(StatusAdapter, boolean), line 274 "dialog.refreshDialogSize();". When that breakpoint is hit, the status dialog is visible.

-------------------------------------
author: Alayna Houston
date: 2017-08-31 07:31:17.000000000

Patch Set 1:

> The dialog is there, but seems to be closed immediately with the
 > wizard together.

Hm. In that case, why don't we run this not in a ModalContext but in a separate Job, returning an error status upon exceptions?

-------------------------------------
author: Douglas Trujillo
date: 2017-08-31 09:56:34.000000000

Patch Set 1:

> > The dialog is there, but seems to be closed immediately with the
 > > wizard together.
 > 
 > Hm. In that case, why don't we run this not in a ModalContext but
 > in a separate Job, returning an error status upon exceptions?

good idea, I'll do that

-------------------------------------
author: Alayna Houston
date: 2017-08-31 10:17:08.000000000

Patch Set 1:

BTW, compare bug 241244 (fixed). I think using a job is simpler than fiddling with that BLOCK flag and will detach the error dialog from the wizard dialog.

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