NEW DATE! Bugzilla will undergo maintenance 2024-03-28 18h00 CET. Bugzilla will be placed in read-only mode at that time.

Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 21486 - Resources opened in wrong editor when changing the default
Summary: Resources opened in wrong editor when changing the default
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 2.0.1   Edit
Assignee: Eduardo Pereira CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-11 10:24 EDT by Randy Hudson CLA
Modified: 2002-08-23 14:52 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2002-07-11 10:24:18 EDT
If I open 100 .java file in the default editor, and then change the default 
editor to be something else, like the Text Editor, and then open those files, 
they continue to be opened in the original Java Source editor, not the Text 
editor.  The Workbench is recording the fact that I opened a given file in the 
Java Source editor, instead of the fact that I opened a given file in the 
*default* editor.  Which makes it really hard to switch between default editors.
Comment 1 Eduardo Pereira CLA 2002-07-26 12:10:33 EDT
Fix is in EditorManager "public IEditorReference openEditor(String 
editorId,IEditorInput input,boolean setVisible) throws PartInitException".

Released in 201 stream.
Comment 2 Eduardo Pereira CLA 2002-07-26 12:44:19 EDT
Fix released in both streams (201 and HEAD)
Comment 3 Knut Radloff CLA 2002-08-23 14:08:08 EDT
Randy,
are you saying that you don't close the .java files that you opened in the 
(default) Java editor, switch the default editor to Text Editor and then open 
the (still open) java files again?
Or are you closing the java files and then reopen them when the Text Editor is 
the default editor. 
I'm trying to verify that this is fixed and don't even see your problem (unless 
it's the former scenario, which I doubt).
In the latter scenario the Java files are opened in the standard text editor 
like I would expect. I'm trying this on R2.0. Is that where you originally had 
the problem? Is it fixed for you now in a more recent build?
Comment 4 Randy Hudson CLA 2002-08-23 14:24:25 EDT
I believe I was using F3, but I can reproduce the following in 2.0 final.
Right click on plugin.xml and manually chose the editor which is marked as the 
default, the PDE one.
Change plugin.xml default editor to Text Editor.
double click on the same plugin.xml, and the PDE editor opens.

It is strange that in the initial step, double-clicking to open PDE's editor 
and manually opening PDE's editor results in something different later on.  
IMO, if I manually select the default editor for a resource, workbench should 
throw away the last used editor, not remember it.

I'm not sure if F3 was different.  I think I opened this bug in reference to 
plugin.xml, and there is a good chance that I had opened all of my plugin.xml 
files using the popup menu at that time.
Comment 5 Knut Radloff CLA 2002-08-23 14:52:43 EDT
Reproduced on R2.0. Verified fixed in 20020821 (2.0.1)