Bug 19087 - [Editor Mgmt] Part events not fired if only one editor allowed
Summary: [Editor Mgmt] Part events not fired if only one editor allowed
Status: RESOLVED DUPLICATE of bug 24508
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-06-04 11:08 EDT by John Arthorne CLA
Modified: 2003-01-22 12:39 EST (History)
3 users (show)

See Also:


Attachments
Eclipse preference file with current pref settings (1.40 KB, text/plain)
2002-06-04 11:09 EDT, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2002-06-04 11:08:40 EDT
Build 20020602 (F2)

- Running in the java browsing perspective
- I will attach my current preferences file so you can recreate setup
- Have two classes, A and B.  In class A, define the following:

public void foo() {
  B b = new B();
  b.bar();
}

- since B#bar does not exist, this is an error.  Select the method, and choose 
"Quick Fix"

- The recommendation is to add B#bar.  Select this and hit enter

- Now the editor switches to showing class B, but the "Types" and "Members" 
views have not correctly tracked the editor change.  Since I have the "Link java 
browsing view selection to active editor" preference turned on, I would expect 
this to track correctly.
Comment 1 John Arthorne CLA 2002-06-04 11:09:03 EDT
Created attachment 1223 [details]
Eclipse preference file with current pref settings
Comment 2 Erich Gamma CLA 2002-06-04 13:08:26 EDT
need to investigate
Comment 3 Dani Megert CLA 2002-06-07 09:07:29 EDT
This is a general workbench issue which bites all part listener users: part
events are not fired when editors are internally reused (only the input is set).
The optimization is OK but should send the correct events.

Note: the same problem can also be reproduced in the Packages view:
1. Link Packages view selection to active editor
2. Repeat the described scenario
==> Packages view selection is out of synch

Comment 4 Dani Megert CLA 2002-06-07 12:11:19 EDT
Changing summary and providing a test case which does not use quick fix:

1. Set editors to 1
2. Check "Link Navigator selection to active editor"
3. From the Navigator open A.java
4. In A.java select B and press F3
==> A.java remains selected in the Navigator
Now set the number of editors to 2 and repeat the test
==> works, i.e. B.java is selected in the Navigator
Comment 5 Nick Edgar CLA 2002-06-07 13:28:11 EDT
We don't have an event to describe a change to an editor's input.
Using partActivated or partBroughtToTop, or any of the other current events, 
would be inaccurate.
Defer to post 2.0.
Comment 6 Randy Giffen CLA 2002-08-12 10:45:38 EDT
Reopened for investigation
Comment 7 Eduardo Pereira CLA 2003-01-22 12:39:27 EST

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