Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 24508

Summary: [Editor Mgmt] Java Browsing views do not track current editor very well
Product: [Eclipse Project] Platform Reporter: James Moody <James_Moody>
Component: UIAssignee: Eduardo Pereira <eduardo_pereira>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: daniel_megert, jared_burns, john.arthorne
Version: 2.0.1   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description James Moody CLA 2002-10-08 10:22:23 EDT
I've consistently had major problems getting the java browsing views to track 
the current editor. I have the following settings, which may be very important:
-Close editors automatically: true
-Number of open editors: 1

Open a Java file with Ctrl-Shift-T. Select a type name in the open editor. 
Press F3. The new editor is opened but the java browsing views do NOT update; 
they still have the old item selected.
Comment 1 Dani Megert CLA 2002-10-08 10:38:36 EDT
Might be related to a PR I filed some time ago against Platform-UI: part events
are not sent correctly if the editor replaces the content. Will have to find the
PR and see if it is the cause for that bug.

Comment 2 Dani Megert CLA 2003-01-15 11:08:52 EST
The input of the editor part is replaced. No part event is fired.
What is the correct way to be informed that the editor now shows another document?
Comment 3 Dani Megert CLA 2003-01-21 10:49:45 EST
looks like a duplicate of bug 19087.
Comment 4 Eduardo Pereira CLA 2003-01-22 12:39:29 EST
*** Bug 19087 has been marked as a duplicate of this bug. ***
Comment 5 Eduardo Pereira CLA 2003-01-23 11:48:03 EST
Released fix to the HEAD stream.
The new method in IPartListener2 is commented out until the implementors in 
other plugins add the implementation. The sender in PartListenerList2 is 
commented out as well.

JavaBrowsingPart should be changed to use IPartListener2 instead. I hacked it 
so I could test the fix and it seems to work.

Daniel, if you want to change JavaBrowsingPart you do not need to wait. You 
can implement IPartListener2 adding this new method.
Comment 6 Dani Megert CLA 2003-01-28 04:19:54 EST
Adapted code where I have commit rights (TypeHierarchyViewPart and Java
BrowsingPart)
Available in I20030128.

Did you inform the other clients to adapt?
Comment 7 Jared Burns CLA 2003-01-28 10:54:18 EST
The Debug UI implementor has been updated as well.
Comment 8 Eduardo Pereira CLA 2003-02-07 11:54:22 EST
Tested in the M5 build.