diff options
Diffstat (limited to 'core/org.eclipse.cdt.core/model/org')
-rw-r--r-- | core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandleFactory.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandleFactory.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandleFactory.java index 7794c5e6afe..bd095e552ae 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandleFactory.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/CElementHandleFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,7 +8,6 @@ * Contributors: * Markus Schorn - initial API and implementation *******************************************************************************/ - package org.eclipse.cdt.internal.core.model.ext; import org.eclipse.cdt.core.dom.IName; @@ -28,6 +27,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPBlockScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace; import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope; @@ -68,7 +68,14 @@ public class CElementHandleFactory { public static ICElementHandle internalCreate(ITranslationUnit tu, IBinding binding, boolean definition, - IRegion region, long timestamp) throws CoreException, DOMException { + IRegion region, long timestamp) throws CoreException, DOMException { + if (binding instanceof ICPPDelegate) { + ICPPDelegate delegate= (ICPPDelegate) binding; + if (delegate.getDelegateType() == ICPPDelegate.USING_DECLARATION) { + binding= delegate.getBinding(); + } + } + ICElement parentElement= create(tu, binding.getScope()); if (parentElement == null) { return null; |