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

Bug 307199

Summary: [Compatibility] 'Javadoc' and 'Declaration' view doesn't follow editor selection
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: RESOLVED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: emoffatt
Version: 1.0   
Target Milestone: 1.0 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 307385    
Bug Blocks:    
Attachments:
Description Flags
Patch that eliminates the recursion in the StackRenderer none

Description Remy Suen CLA 2010-03-26 11:19:30 EDT
If I click stuff in the 'Outline' view then they show up but they don't follow the text cursor.
Comment 1 Remy Suen CLA 2010-03-26 12:32:54 EDT
SelectionService was not considering a part's post selection events. Fixed in HEAD.
Comment 2 Remy Suen CLA 2010-03-29 08:18:25 EDT
They follow the selection now but if I activate the other view its content is still on the old selection.
Comment 3 Remy Suen CLA 2010-03-30 13:15:21 EDT
I think the 'Properties' view is suffering from the same problem.
Comment 4 Eric Moffatt CLA 2010-03-30 15:30:04 EDT
Created attachment 163443 [details]
Patch that eliminates the recursion in the StackRenderer


The Problem:

Make the PackageExplorer is the active view and Problems the visible view in the bottom stack. (i.e. click on the Promlems view, then the PE)

Now, a direct click on the Javadoc view will cause two independent events:

1) The 'SWT.Activate' listener fires, causing the Problems view to become active
2) *Then* the CTF's selection event fires and the Javadoc view activates

The solution:

Remove the SWT.Activate listener from the LazyStackRenderer.

Modify both the SWT.Activate Listener *and* the tab 'click' listener to delegate to an asynchExec that will activate the stacks currently selected element.

Now when the asynch event fires only one activation is performed.
Comment 5 Eric Moffatt CLA 2010-03-30 15:31:11 EDT
NOTE: This code also inhibits the EPS's 'activate' event from firing if the suggested 'part' is the 'activePart'. Remy, if this causes problems come see me.

This is necessary because when we click on a view that is hosted in a stack *both* the view and the stack get sent SWT.Activate events, again causing two activations if the check isn't there...
Comment 6 Eric Moffatt CLA 2010-03-30 15:33:13 EDT
Committed in >20100330. Applied the patch.

Now it appears that everything stays in synch...
Comment 7 Eric Moffatt CLA 2010-03-30 15:50:42 EDT
*** Bug 307385 has been marked as a duplicate of this bug. ***