summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManju Mathew2013-03-13 08:31:49 (EDT)
committer Dani Megert2013-03-13 08:31:49 (EDT)
commit4040304852a0dba347a65c7ed192f1c5456e55dd (patch)
tree4d11103557bec294ce9f4cef29867567f0bdd251
parent744663f82bfa2d54141314b9abdb0522dd9df427 (diff)
downloadeclipse.jdt.ui-4040304852a0dba347a65c7ed192f1c5456e55dd.zip
eclipse.jdt.ui-4040304852a0dba347a65c7ed192f1c5456e55dd.tar.gz
eclipse.jdt.ui-4040304852a0dba347a65c7ed192f1c5456e55dd.tar.bz2
Fixed bug 403074: [info views] Regressions from bug 393143
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/AbstractInfoView.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/AbstractInfoView.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/AbstractInfoView.java
index 674ea97..80b5415 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/AbstractInfoView.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/AbstractInfoView.java
@@ -686,7 +686,7 @@ public abstract class AbstractInfoView extends ViewPart implements ISelectionLis
return;
selection= provider.getSelection();
- if (selection == null || selection.isEmpty())
+ if (selection == null) // if selection is empty then we need to check if the current view input is valid. If not the view should be cleared
return;
}
@@ -706,15 +706,20 @@ public abstract class AbstractInfoView extends ViewPart implements ISelectionLis
je= element;
else {
je= findSelectedJavaElement(part, selection);
- if (isIgnoringNewInput(je, part, selection))
+ if (isIgnoringNewInput(je, part, selection)) {
+ // if the link image was broken due to the previous selection then correct it before returning
+ updateLinkImage(false);
return;
+ }
}
// The actual computation
final Object input= computeInput(part, selection, je, computeProgressMonitor);
if (input == null && !resetIfInvalid && fCurrentViewInput != null) {
IJavaElement oldElement= fCurrentViewInput;
- if (oldElement == null || oldElement.exists()) {
+ // update the link image only if the old view 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;