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

Bug 403004

Summary: Link with selection icon changes automatically in Javadoc and Declaration views
Product: [Eclipse Project] JDT Reporter: Noopur Gupta <noopur_gupta>
Component: TextAssignee: Martin Mathew <manju656>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P2 CC: daniel_megert
Version: 4.3   
Target Milestone: 4.3 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Noopur Gupta CLA 2013-03-12 05:15:33 EDT
1. Enable link with selection in both javadoc and declaration views.
2. Select a java file in package explorer.
3. Select javadoc view, then declaration view and then the javadoc view again. (Or switch between javadoc and declaration views alternatively 2-3 times).

The icon for link with selection changes automatically in the Javadoc view.
Comment 1 Dani Megert CLA 2013-03-12 05:25:20 EDT
Can reproduce with code from 'master'.

Manju, please take a look for M6.
Comment 2 Martin Mathew CLA 2013-03-12 08:12:09 EDT
AbstractInfoView#selectionChanged(), here if the selectionChanged event is triggered from one of the InfoViews i.e either SourceView or JavadocView, then AbstractInfoView need not honor the event. This is because there will not be any change in the input of the view if the selection is changed in one of the InfoViews.

So in AbstractInfoView#selectionChanged() instead of checking for 
		if (part.equals(this)) {
			return;
		}
if we check
		if (part instanceof AbstractInfoView)
			return;
the issue will be resolved.

Dani, kindly verify.
Comment 3 Dani Megert CLA 2013-03-13 08:15:35 EDT
Actually, the behavior is expected since the view is no longer tracking the selection. We should not add special treatment here.