Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2008-01-05 14:16:42 -0500
committerSergey Prigogin2008-01-05 14:16:42 -0500
commit23bdd46fd90bb4daff3b7e7ccfac8b9abc978081 (patch)
tree9134cd35809c3ce139b67789588ccc9f2ce3ff03
parent0c647ac1d5b60ca852e6f96fdf771f0849fbf55f (diff)
downloadorg.eclipse.cdt-23bdd46fd90bb4daff3b7e7ccfac8b9abc978081.tar.gz
org.eclipse.cdt-23bdd46fd90bb4daff3b7e7ccfac8b9abc978081.tar.xz
org.eclipse.cdt-23bdd46fd90bb4daff3b7e7ccfac8b9abc978081.zip
Improved fix for bug 207320.
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java
index 13467b8146..e8bae4e587 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java
@@ -39,7 +39,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
-import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.index.IIndexManager;
import org.eclipse.cdt.core.index.IIndexName;
@@ -131,12 +131,12 @@ public class OpenDeclarationsAction extends SelectionParseAction {
if (binding != null && !(binding instanceof IProblemBinding)) {
IName[] declNames = findNames(fIndex, ast, isDefinition, binding);
if (declNames.length == 0) {
- if(binding instanceof ICPPTemplateInstance) {
- // bug 207320, handle template instances
- IBinding definition= ((ICPPTemplateInstance)binding).getTemplateDefinition();
- if(definition != null && !(definition instanceof IProblemBinding)) {
- declNames = findNames(fIndex, ast, true, definition);
- }
+ if (binding instanceof ICPPSpecialization) {
+ // bug 207320, handle template instances
+ IBinding specialized= ((ICPPSpecialization) binding).getSpecializedBinding();
+ if (specialized != null && !(specialized instanceof IProblemBinding)) {
+ declNames = findNames(fIndex, ast, true, specialized);
+ }
} else if (binding instanceof ICPPMethod) {
// bug 86829, handle implicit methods.
ICPPMethod method= (ICPPMethod) binding;

Back to the top