Community
Participate
Working Groups
The implement in EditorRegistry of getDefaultEditor guesses a content type and then tries to find the editor based on that one content type. The problem is that if there is no editor registered for the guessed content type, null is returned even when there are other content types for which there are registered editors. This causes problems for EMF: https://bugs.eclipse.org/bugs/show_bug.cgi?id=349552 It would be much better (i.e., more correct with regard to the documented behavior) if the method implementation considered each possible content type and returned an editor descriptor if there is any content type with a registered editor.
It should use IContentTypeMatcher.findContentTypesFor(String) and try all content types.
Created attachment 202451 [details] EditorRegistry patch v1 Ed, if I understand your request correctly, I think this is what you want?
Yes, that would be much better!!
(In reply to comment #3) > Yes, that would be much better!! Thanks. I'll try to get this.
*** Bug 349552 has been marked as a duplicate of this bug. ***
(In reply to comment #2) > Created attachment 202451 [details] > EditorRegistry patch v1 This first test introduced test failures. I rewrote the code to minimize introducing casualties and regressions. Thanks for the bug report, Ed! I've released the fix to master and R3_development. I also screwed up in my commit so I had to do a second commit to fix the problem. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=2d5698e57a0c5913b5c4292806d23fd1d5569e1f http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=a78e46c87f7145ecc3a8e61bd7cbab7a601db039 http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R3_development&id=b6996e7115c163052c3ee14f3a35b6c5766baa38 http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R3_development&id=e495d4c520e380d5c2626041cfd1f259f70565ba