Bug 193361 - [EditorMgmt] Unexpected behaviour opening sample XML editor
Summary: [EditorMgmt] Unexpected behaviour opening sample XML editor
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Remy Suen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-19 12:57 EDT by Paul Webster CLA
Modified: 2019-09-06 16:04 EDT (History)
3 users (show)

See Also:


Attachments
EditorRegistry patch v1 (6.20 KB, patch)
2010-01-19 16:26 EST, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2007-06-19 12:57:08 EDT
I created the Sample XML editor and lauched eclipse.  When I try and open my random XML file (test.xml) it opens in the text editor, not the sample XML editor we've provided.  The XML editor *is* available if you go to "Open With".

It seems that just having the content type descriptions override the editor extension declaration.

PW
Comment 1 Dani Megert CLA 2007-06-20 04:59:00 EDT
The bug is in EditorRegistry.findRelatedObjects: it correctly collects the xml editor but also adds all the editors that match the supertype of XML content type. Unfortunately it adds the editors for the supertypes to the list before it adds the ones bound to the extension. 

The whole method could deserve some polish ;-)
Comment 2 Boris Bokowski CLA 2008-05-02 14:56:44 EDT
Mass update - removing 3.4 target. This was one of the bugs I marked for investigation (and potential fixing) in 3.4 but I ran out of time. Please ping on the bug if fixing it would be really important for 3.4, and does not require API changes or feature work.
Comment 3 Boris Bokowski CLA 2009-11-17 13:05:01 EST
Remy is now responsible for watching the [EditorMgmt] component area.
Comment 4 Remy Suen CLA 2010-01-19 16:26:35 EST
Created attachment 156569 [details]
EditorRegistry patch v1

This patch corrects the order of the collection with a test.

I didn't put the test directly in IEditorRegistryTest since I didn't want to be contributing an XML editor in the org.eclipse.ui.tests bundle directly as this can cause undesired effects when opening XML files in the runtime workspace.
Comment 5 Remy Suen CLA 2010-01-19 16:27:46 EST
(In reply to comment #4)
> Created an attachment (id=156569) [details]
> EditorRegistry patch v1

Patch released to HEAD >20100119.
Comment 6 Remy Suen CLA 2010-01-26 07:50:09 EST
Verified on I20100125-1800.
Comment 7 Remy Suen CLA 2010-02-17 08:41:31 EST
Had to roll this back for bug 302297.
Comment 8 Eclipse Webmaster CLA 2019-09-06 16:04:37 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.