| Summary: | Resolve API breakage of IDE#getEditorDescription (OperationCanceledException, user interaction) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> |
| Component: | UI | Assignee: | Mickael Istria <mistria> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P1 | CC: | gautier.desaintmartinlacaze, Lars.Vogel, loskutov, markus.kell.r, mistria, psuzzi |
| Version: | 4.6 | ||
| Target Milestone: | 4.6 M6 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485201 https://git.eclipse.org/r/65348 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=912f0f8bfe79b6c3e7bb8ae687d7399738b29d13 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 90292 | ||
|
Description
Dani Megert
The OperationCanceledException is a small breakage that would be acceptable. But the problem is much deeper. The IDE#getEditorDescriptor(..) APIs are headless APIs that resolve an editor deterministically and without user interaction. Opening a dialog from these APIs was a breaking change that must be reverted. One scenario that is broken due to these changes: - Preferences > File Associations: Open unassociated files with: Ask via pop-up - create a new file a.zz - open in Text Editor, add some content, Save - Team > Show Local History - try to open the context menu on a history entry (e.g. right-click) => "Editor Selection" dialog is opened. Context menu is inaccessible. Mickael, maybe you can move the logic that asks the user into the #openEditor methods. That would also allow us to get rid of the OperationCanceledException. (In reply to Dani Megert from comment #2) > Mickael, maybe you can move the logic that asks the user into the > #openEditor methods. That would also allow us to get rid of the > OperationCanceledException. Here is a better and cleaner solution: - Introduce new #getEditorDescriptor API(s) that take a boolean which tells whether it is OK to open a dialog in the UI. - Deprecate the old methods and call the new ones with 'false'. - Fix all new deprecation warnings where #getEditorDescriptor is called, using either 'true' or 'false', depending on the case. - Add an entry to the migration guide. (In reply to Dani Megert from comment #3) > Here is a better and cleaner solution: > - Introduce new #getEditorDescriptor API(s) that take a boolean which tells > whether it is OK to open a dialog in the UI. > - Deprecate the old methods and call the new ones with 'false'. > - Fix all new deprecation warnings where #getEditorDescriptor is called, > using either 'true' or 'false', depending on the case. > - Add an entry to the migration guide. I thought about that. I'll do it like this. New Gerrit change created: https://git.eclipse.org/r/65348 Gerrit change https://git.eclipse.org/r/65348 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=912f0f8bfe79b6c3e7bb8ae687d7399738b29d13 |