| Summary: | LWS icon changes without change in selected input type in Javadoc / Declaration view | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Noopur Gupta <noopur_gupta> |
| Component: | Text | Assignee: | 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
AbstractInfoView#setLinkingEnabled() internally invokes #computeAndDoSetInput() with the argument (resetIfInvalid = true) which forces to reset the view in case of an invalid input.This results in an empty view and a normal icon in the Info view. Now if the user selects another invalid input from the Package Explorer View, then #computeAndDoSetInput() is invoked with parameter (resetIfInvalid = false), hence the view contents remains the same but the icon is updated to show an invalid input.
One solution would be to check in the background thread initiated by #computeAndDoSetInput the content of the old input and update the icon only if #computeInput() returns a non null value.
//The actual computation
final Object input= computeInput(part, selection, je, computeProgressMonitor);
if (input == null && !resetIfInvalid && fCurrentViewInput != null) {
IJavaElement oldElement= fCurrentViewInput;
//update the link image only if the old input was a valid one
Object oldInput= computeInput(null, null, oldElement, computeProgressMonitor);
if (oldInput != null && oldElement.exists()) {
// leave the last shown documentation until it becomes invalid
updateLinkImage(true);
return;
}
}
*** This bug has been marked as a duplicate of bug 403074 *** |