Bug 11459 - [Preferences] Default file editor preferences won't die
Summary: [Preferences] Default file editor preferences won't die
Status: RESOLVED DUPLICATE of bug 22953
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-15 09:20 EST by Jared Burns CLA
Modified: 2002-08-28 13:36 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 Jared Burns CLA 2002-03-15 09:20:08 EST
1. Go to "Workbench->Preferences->Workbench->File Editors"
2. Remove all of the xml-related (plugin.xml, etc.) file types.
3. Add a "*.xml" file type and associate it with the text editor.
4. Accept the preference change and close the preference dialog.
5. Double click a plugin.xml file. It is correctly opened in the text editor.
6. Restart Eclipse.
7. Double click a plugin.xml file. It is opened with the plugin manifest editor.
8. The old associations have been readded under
"Workbench->Preferences->Workbench->File Editors"

It seems that either deletion of associations isn't being persisted or the
default associations are re-added everytime the workbench starts up.
Comment 1 Randy Giffen CLA 2002-03-19 10:54:36 EST
The file editor preferences where designed to rely on knowing if a plugin has 
changed since the workbench was last started. Core used to have API for this 
(although it was never implemented and just returned true everty time). It 
appears this api has been removed.

This is a difficult problem to solve. We need to add associations from any 
newly added plugins. In remebering deletions we would have to distinguish 
between associations from a plugin vs. associations added by the user.

DJ are there plans to support an isChanged api for IPluginDescriptor?
Comment 2 DJ Houghton CLA 2002-03-19 11:14:25 EST
Do you know which class the API was removed from?
Comment 3 Jared Burns CLA 2002-04-03 09:52:44 EST
I apologize in advance if this is just crazy talk but...

When you're building the list of associations don't you just add associations
from plugins, then add associations added by users, then remove associations
deleted by users?
Comment 4 Randy Giffen CLA 2002-04-03 10:14:22 EST
Actually I released some new code in this area recently.
On shutdown, for a given extension, we save 
1) All associated editors
2) All editors which were explictly deleted by the user
Then on startup
1) We get all associated editors from plugins
2) Ensure that all associated editors from the saved sate are included
3) Remove deleted editors

This is only a partial solution since if you delete an extension, it will 
reappear with all its editors on restart

Comment 5 Tod Creasey CLA 2002-08-09 12:38:40 EDT
Still an issue in 20020803
Comment 6 Tod Creasey CLA 2002-08-28 13:36:23 EDT
Markign a duplicate of meta pr about editor managment redesign required.

*** This bug has been marked as a duplicate of 22953 ***