DESCRIPTION

Bug 486635 - Exception logged after cancelling Editor Selection dialog

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


COMMENTS

author: Jayvion Booth
date: 2016-01-27 13:35:27.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2016-01-27 13:35:33.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/8116/

-------------------------------------
author: Sebastian Porter
date: 2016-01-27 13:38:36.000000000

Patch Set 2: Verified-1

> What do you mean by "1. switch to use pop-up"?

The new 'Ask via pop-up' option.


As I tried to explain before: you can't patch the callers. There are tons out there. You need to fix it at the root.

-------------------------------------
author: Jayvion Booth
date: 2016-01-27 13:44:59.000000000

Patch Set 2:

> > What do you mean by "1. switch to use pop-up"?
 > 
 > The new 'Ask via pop-up' option.
 > 
 > 
 > As I tried to explain before: you can't patch the callers. There
 > are tons out there. You need to fix it at the root.

I've logged on the bug. The IDE.open() must return something, and "null" return means "opened in external editor". Do you propose to  change semantics of the return value?

-------------------------------------
author: Jayvion Booth
date: 2016-01-27 14:02:10.000000000

Abandoned

-------------------------------------
author: Brenden Conley
date: 2016-01-27 14:03:02.000000000

Patch Set 2:

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/8116/ : SUCCESS

-------------------------------------
author: Sebastian Porter
date: 2016-01-27 15:25:58.000000000

Patch Set 2:

> > > What do you mean by "1. switch to use pop-up"?
 > >
 > > The new 'Ask via pop-up' option.
 > >
 > >
 > > As I tried to explain before: you can't patch the callers. There
 > > are tons out there. You need to fix it at the root.
 > 
 > I've logged on the bug. The IDE.open() must return something, and
 > "null" return means "opened in external editor". Do you propose to 
 > change semantics of the return value?

Argh, this is nasty! #openEditor is not the issue, but #getEditorDescriptor which does not allow 'null'. This makes a clean fix impossible and we will have to live with the OperationCanceledException and catch the cases we know about.

We should catch the exception in the #openEditor methods and then return 'null' (no one does - or could do - anything useful with 'null'). This would shield most clients (e.g. catch in OpenAndLinkWithEditorHelper would not be needed), except for those who call #getEditorDescriptor, like e.g. the OpenWithMenu.

And we need document the new exception in all #getEditorDescriptor API methods.

Andrey, what do you think? Would you be able to provide a patch along these lines?

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