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

Bug 403016

Summary: Incorrect LWS icon in Declaration view
Product: [Eclipse Project] JDT Reporter: Noopur Gupta <noopur_gupta>
Component: TextAssignee: Martin Mathew <manju656>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 4.3   
Target Milestone: 4.3 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Noopur Gupta CLA 2013-03-12 06:24:17 EDT
1. In Declaration view, enable LWS.
2. Select a java file in pkg explorer. View will show the content appropriately.
3. Now select a Java Project in pkg explorer. LWS icon will change.
4. Select the same java file back (as in step 2) in pkg explorer.

The LWS icon is not updated to the 'normal' icon after step 4.
Comment 1 Dani Megert CLA 2013-03-12 06:26:01 EDT
Manju, please investigate.
Comment 2 Martin Mathew CLA 2013-03-12 10:03:54 EDT
AbstractInfoView#computeAndDoSetInput() initiates a background thread which finds the correct input for the view. There is a method #isIgnoringNewInput() which determines if the previous input and the current input are the same. If it is the same then no further action is taken to refresh the view or update the icon.
The issue is even though the input is valid, the icon would have changed it's state due to a previous invalid selection like the scenario described by the bug report. So before returning, the icon state has to be corrected.

					if (isIgnoringNewInput(je, part, selection)) {
						updateLinkImage(false);
						return;
					}
Comment 3 Dani Megert CLA 2013-03-13 08:33:55 EDT

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