Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2011-03-15 01:03:34 +0000
committerMarc-Andre Laperle2011-03-15 01:03:34 +0000
commit18cae2a5248775d772cf820716027e851e4d5d15 (patch)
tree8245a8bb849be8f8442b0a4677f92a919980ddce
parentd2b90dc58427cc3096d74aeacaefdf45ebc72a59 (diff)
downloadorg.eclipse.cdt-18cae2a5248775d772cf820716027e851e4d5d15.tar.gz
org.eclipse.cdt-18cae2a5248775d772cf820716027e851e4d5d15.tar.xz
org.eclipse.cdt-18cae2a5248775d772cf820716027e851e4d5d15.zip
Bug 339780 - Source hover for specialization of specialization does not work
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.java
index 74e3984a4c5..b5d4541ee4f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.java
@@ -218,11 +218,14 @@ public class CSourceHover extends AbstractCEditorTextHover {
// in case the binding is a non-explicit specialization we need
// to consider the original binding (bug 281396)
- if (names.length == 0 && binding instanceof ICPPSpecialization) {
- binding= ((ICPPSpecialization) binding).getSpecializedBinding();
- if (!(binding instanceof IProblemBinding)) {
- names= findDefsOrDecls(ast, binding);
+ while (names.length == 0 && binding instanceof ICPPSpecialization) {
+ IBinding specializedBinding = ((ICPPSpecialization) binding).getSpecializedBinding();
+ if (specializedBinding == null || specializedBinding instanceof IProblemBinding) {
+ break;
}
+
+ names = findDefsOrDecls(ast, specializedBinding);
+ binding = specializedBinding;
}
if (names.length > 0) {
for (IName name : names) {

Back to the top