Bug 206163 - [EditorMgmt] Change in default editor using extension point is ignored
Summary: [EditorMgmt] Change in default editor using extension point is ignored
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-12 12:19 EDT by John Lawrence CLA
Modified: 2019-09-06 16:14 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Lawrence CLA 2007-10-12 12:19:14 EDT
Build ID: M20060830-0800

Steps To Reproduce:
1.using org.eclipse.ui.editors extenstion point, set editor "A" the default editor (default="true") for *.cbl
2.open a workspace and show that A is invoked with fred.cbl is double-clicked.
3.shut down the workspace
4.delete A's plugin and add a plugin for editor "B".  Specify default="true" for *.cbl in its plugin.xml.
5.open the same workspace and observe that some editor other than "B" is invoked when fred.cbl is double-clicked.


More information:
org.eclipse.ui.workbench.prefs contents after step 3 (A = Os390SolutionsEditor):

<info extension\="cbl" name\="*">\r\n
<editor id\="com.ibm.ftt.ui.os390editors.Os390SolutionsEditor"/>\r\n
<editor id\="com.ibm.lpex.BasicLpexEditor"/>\r\n
<defaultEditor id\="com.ibm.ftt.ui.os390editors.Os390SolutionsEditor"/>\r\n
</info>\r\n

File contents after step 5: (B = SystemzLpex)

<info extension\="cbl" name\="*">\r\n
<editor id\="com.ibm.ftt.ui.os390editors.Os390SolutionsEditor"/>\r\n
<editor id\="com.ibm.lpex.BasicLpexEditor"/>\r\n
<defaultEditor id\="com.ibm.ftt.ui.os390editors.Os390SolutionsEditor"/>\r\n
</info>\r\n

NOTE that editor B is not even mentioned)

Bring up the preferences dialog, General->Editors->File Associations, and click on *.cbl.  See that B is shown as one of the choices (A is not), but there is no default selected.  Shut down the workspace after closing the dialog, and the file shows:

<info extension\="cbl" name\="*">\r\n
<editor id\="com.ibm.lpex.BasicLpexEditor"/>\r\n
<editor id\="com.ibm.ftt.lpex.systemz.SystemzLpex"/>\r\n
</info>\r\n

NOTE that now B is mentioned, but it is not the default.

Bring up the workspace again and go to preferences again and 
set B as the default:  Shut down and the file now shows:

<info extension\="cbl" name\="*">\r\n
<editor id\="com.ibm.ftt.lpex.systemz.SystemzLpex"/>\r\n
<editor id\="com.ibm.lpex.BasicLpexEditor"/>\r\n
<defaultEditor id\="com.ibm.ftt.lpex.systemz.SystemzLpex"/>\r\n
</info>\r\n

NOTE that now B is the default

So *.cbl is now ok, but any other extensions specified for B, still are not ok.

Erasing the file prior to bringing up the workspace is a workaround, since that causes the plugin.xml extension point usage to be correctly set up in the file associations.
Comment 1 John Lawrence CLA 2007-10-23 14:40:03 EDT
Can you please tell me if the workaround of deleting the file mentioned in the original description is reasonable?  What other information would be lost when this file is deleted?

Thanks ... John
Comment 2 Boris Bokowski CLA 2007-10-29 00:47:20 EDT
Sorry, I was away on a conference. I will try to answer in the next couple of days.
Comment 3 John Lawrence CLA 2007-12-05 11:11:40 EST
Any update on this problem?  Thanks.
Comment 4 Boris Bokowski CLA 2008-05-02 14:56:49 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 5 Boris Bokowski CLA 2009-11-17 13:05:54 EST
Remy is now responsible for watching the [EditorMgmt] component area.
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:14:21 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.