mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 00:45:28 +02:00
177917: have composite bindings also implement ICPPDelegateCreator
This commit is contained in:
parent
de268f3094
commit
b92596a0ae
16 changed files with 120 additions and 14 deletions
|
@ -86,7 +86,7 @@ public abstract class IndexCPPBindingResolutionTest extends IndexBindingResoluti
|
|||
// int g(int x) {return 4;}
|
||||
// int g(char x) {return 2;}
|
||||
// int nn= g(f(2));
|
||||
public void _testUsingTypeDirective_177917_1() {
|
||||
public void testUsingTypeDirective_177917_1() {
|
||||
IBinding b1= getBindingFromASTName("A a", 1);
|
||||
IBinding b2= getBindingFromASTName("B b", 1);
|
||||
IBinding b3= getBindingFromASTName("C c", 1);
|
||||
|
|
|
@ -12,17 +12,21 @@ package org.eclipse.cdt.internal.core.index.composite.cpp;
|
|||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization;
|
||||
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.ICPPSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
|
||||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassTemplate;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplates;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalTemplateInstantiator;
|
||||
import org.eclipse.cdt.internal.core.index.CIndex;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
|
@ -30,7 +34,7 @@ import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
|||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
public class CompositeCPPClassTemplate extends CompositeCPPClassType implements
|
||||
ICPPClassTemplate, ICPPInternalTemplateInstantiator{
|
||||
ICPPClassTemplate, ICPPDelegateCreator, ICPPInternalTemplateInstantiator {
|
||||
|
||||
public CompositeCPPClassTemplate(ICompositesFactory cf, ICPPClassType ct) {
|
||||
super(cf, ct);
|
||||
|
@ -87,5 +91,8 @@ ICPPClassTemplate, ICPPInternalTemplateInstantiator{
|
|||
|
||||
return CPPTemplates.instantiateTemplate(this, arguments, null);
|
||||
}
|
||||
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPClassTemplate.CPPClassTemplateDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.index.composite.cpp;
|
|||
|
||||
import org.eclipse.cdt.core.dom.IName;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IField;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
|
@ -19,14 +20,17 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBase;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassType.CPPClassTypeDelegate;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexType;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPClassType extends CompositeCPPBinding implements ICPPClassType, IIndexType {
|
||||
class CompositeCPPClassType extends CompositeCPPBinding implements ICPPClassType, ICPPDelegateCreator, IIndexType {
|
||||
public CompositeCPPClassType(ICompositesFactory cf, ICPPClassType rbinding) {
|
||||
super(cf, rbinding);
|
||||
}
|
||||
|
@ -172,4 +176,8 @@ class CompositeCPPClassType extends CompositeCPPBinding implements ICPPClassType
|
|||
public boolean isSameType(IType type) {
|
||||
return ((ICPPClassType)rbinding).isSameType(type);
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPClassTypeDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,15 +11,19 @@
|
|||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IEnumeration;
|
||||
import org.eclipse.cdt.core.dom.ast.IEnumerator;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPEnumeration.CPPEnumerationDelegate;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexType;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPEnumeration extends CompositeCPPBinding implements IEnumeration, IIndexType {
|
||||
class CompositeCPPEnumeration extends CompositeCPPBinding implements IEnumeration, ICPPDelegateCreator, IIndexType {
|
||||
public CompositeCPPEnumeration(ICompositesFactory cf, IEnumeration rbinding) {
|
||||
super(cf, (ICPPBinding) rbinding);
|
||||
}
|
||||
|
@ -36,4 +40,8 @@ class CompositeCPPEnumeration extends CompositeCPPBinding implements IEnumeratio
|
|||
}
|
||||
|
||||
public Object clone() { fail(); return null; }
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPEnumerationDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,13 +11,17 @@
|
|||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IEnumerator;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPEnumerator;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexType;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPEnumerator extends CompositeCPPBinding implements IEnumerator {
|
||||
class CompositeCPPEnumerator extends CompositeCPPBinding implements IEnumerator, ICPPDelegateCreator {
|
||||
public CompositeCPPEnumerator(ICompositesFactory cf, IEnumerator rbinding) {
|
||||
super(cf, (ICPPBinding) rbinding);
|
||||
}
|
||||
|
@ -26,4 +30,8 @@ class CompositeCPPEnumerator extends CompositeCPPBinding implements IEnumerator
|
|||
IType type = ((IEnumerator)rbinding).getType();
|
||||
return cf.getCompositeType((IIndexType)type);
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPEnumerator.CPPEnumeratorDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,15 +11,19 @@
|
|||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.ICompositeType;
|
||||
import org.eclipse.cdt.core.dom.ast.IField;
|
||||
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.ICPPField;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPField;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPField extends CompositeCPPVariable implements ICPPField {
|
||||
class CompositeCPPField extends CompositeCPPVariable implements ICPPField, ICPPDelegateCreator {
|
||||
public CompositeCPPField(ICompositesFactory cf, ICPPField rbinding) {
|
||||
super(cf, rbinding);
|
||||
}
|
||||
|
@ -37,4 +41,8 @@ class CompositeCPPField extends CompositeCPPVariable implements ICPPField {
|
|||
IBinding preresult = ((IField)rbinding).getCompositeTypeOwner();
|
||||
return (ICompositeType) cf.getCompositeBinding((IIndexFragmentBinding) preresult);
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPField.CPPFieldDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,16 +12,20 @@ package org.eclipse.cdt.internal.core.index.composite.cpp;
|
|||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.IParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunction;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexType;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPFunction extends CompositeCPPBinding implements ICPPFunction {
|
||||
class CompositeCPPFunction extends CompositeCPPBinding implements ICPPFunction, ICPPDelegateCreator {
|
||||
|
||||
public CompositeCPPFunction(ICompositesFactory cf, ICPPFunction rbinding) {
|
||||
super(cf, rbinding);
|
||||
|
@ -85,4 +89,8 @@ class CompositeCPPFunction extends CompositeCPPBinding implements ICPPFunction {
|
|||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPFunction.CPPFunctionDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,17 +11,21 @@
|
|||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunctionTemplate;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalTemplateInstantiator;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
public class CompositeCPPFunctionTemplate extends CompositeCPPFunction implements ICPPFunctionTemplate, ICPPInternalTemplateInstantiator {
|
||||
public class CompositeCPPFunctionTemplate extends CompositeCPPFunction implements ICPPFunctionTemplate, ICPPInternalTemplateInstantiator, ICPPDelegateCreator {
|
||||
|
||||
public CompositeCPPFunctionTemplate(ICompositesFactory cf, ICPPFunction rbinding) {
|
||||
super(cf, rbinding);
|
||||
|
@ -47,4 +51,7 @@ public class CompositeCPPFunctionTemplate extends CompositeCPPFunction implement
|
|||
return InternalTemplateInstantiatorUtil.instantiate(arguments, cf, rbinding);
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPFunctionTemplate.CPPFunctionTemplateDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,13 +11,17 @@
|
|||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
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.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPMethod;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPMethod extends CompositeCPPFunction implements ICPPMethod {
|
||||
class CompositeCPPMethod extends CompositeCPPFunction implements ICPPMethod, ICPPDelegateCreator {
|
||||
|
||||
public CompositeCPPMethod(ICompositesFactory cf, ICPPFunction rbinding) {
|
||||
super(cf, rbinding);
|
||||
|
@ -43,4 +47,8 @@ class CompositeCPPMethod extends CompositeCPPFunction implements ICPPMethod {
|
|||
public int getVisibility() throws DOMException {
|
||||
return ((ICPPMethod)rbinding).getVisibility();
|
||||
}
|
||||
|
||||
public final ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPMethod.CPPMethodDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,13 +11,17 @@
|
|||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNamespace;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPNamespace extends CompositeCPPBinding implements ICPPNamespace {
|
||||
class CompositeCPPNamespace extends CompositeCPPBinding implements ICPPNamespace, ICPPDelegateCreator {
|
||||
ICPPNamespace[] namespaces;
|
||||
public CompositeCPPNamespace(ICompositesFactory cf, ICPPNamespace[] namespaces) {
|
||||
super(cf, namespaces[0]);
|
||||
|
@ -37,4 +41,8 @@ class CompositeCPPNamespace extends CompositeCPPBinding implements ICPPNamespace
|
|||
public ICPPNamespaceScope getNamespaceScope() throws DOMException {
|
||||
return new CompositeCPPNamespaceScope(cf, namespaces);
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPNamespace.CPPNamespaceDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,11 +10,15 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPParameter;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPParameter extends CompositeCPPVariable implements ICPPParameter {
|
||||
class CompositeCPPParameter extends CompositeCPPVariable implements ICPPParameter, ICPPDelegateCreator {
|
||||
public CompositeCPPParameter(ICompositesFactory cf, ICPPVariable rbinding) {
|
||||
super(cf, rbinding);
|
||||
}
|
||||
|
@ -22,4 +26,8 @@ class CompositeCPPParameter extends CompositeCPPVariable implements ICPPParamete
|
|||
public boolean hasDefaultValue() {
|
||||
return ((ICPPParameter)rbinding).hasDefaultValue();
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPParameter.CPPParameterDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,10 +11,13 @@
|
|||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTypedef;
|
||||
import org.eclipse.cdt.internal.core.index.CPPTypedefClone;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexType;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
@ -40,4 +43,8 @@ class CompositeCPPTypedef extends CompositeCPPBinding implements ITypedef, IInde
|
|||
public Object clone() {
|
||||
return new CPPTypedefClone(this);
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPTypedef.CPPTypedefDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,12 +11,16 @@
|
|||
package org.eclipse.cdt.internal.core.index.composite.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVariable;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDelegateCreator;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexType;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
||||
class CompositeCPPVariable extends CompositeCPPBinding implements ICPPVariable {
|
||||
class CompositeCPPVariable extends CompositeCPPBinding implements ICPPVariable, ICPPDelegateCreator {
|
||||
|
||||
public CompositeCPPVariable(ICompositesFactory cf, ICPPVariable delegate) {
|
||||
super(cf, delegate);
|
||||
|
@ -46,4 +50,8 @@ class CompositeCPPVariable extends CompositeCPPBinding implements ICPPVariable {
|
|||
public boolean isStatic() throws DOMException {
|
||||
return ((ICPPVariable)rbinding).isStatic();
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPVariable.CPPVariableDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.eclipse.cdt.core.dom.ast.ITypedef;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization;
|
||||
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.ICPPSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
|
||||
|
@ -39,6 +40,7 @@ import org.eclipse.cdt.core.index.IndexFilter;
|
|||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassScope;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassTemplate;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredClassInstance;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPSemantics;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplates;
|
||||
|
@ -412,4 +414,8 @@ class PDOMCPPClassTemplate extends PDOMCPPClassType
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
public ICPPDelegate createDelegate(IASTName name) {
|
||||
return new CPPClassTemplate.CPPClassTemplateDelegate(name, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,6 +240,13 @@ class PDOMCPPClassTemplatePartialSpecialization extends
|
|||
return type.isSameType(this);
|
||||
}
|
||||
|
||||
if (type instanceof PDOMNode) {
|
||||
PDOMNode node= (PDOMNode) type;
|
||||
if (node.getPDOM() == getPDOM()) {
|
||||
return node.getRecord() == getRecord();
|
||||
}
|
||||
}
|
||||
|
||||
if( type instanceof ICPPSpecialization ) {
|
||||
ICPPClassType ct1= (ICPPClassType) getSpecializedBinding();
|
||||
ICPPClassType ct2= (ICPPClassType) ((ICPPSpecialization)type).getSpecializedBinding();
|
||||
|
|
|
@ -489,7 +489,7 @@ public abstract class CPPSelectionTestsAnyIndexer extends BaseSelectionTestsInde
|
|||
// #include "testBug168533.h"
|
||||
// using N::d; // declares
|
||||
// int a= d;
|
||||
public void _testBug168533() throws Exception {
|
||||
public void testBug168533() throws Exception {
|
||||
StringBuffer[] buffers= getContents(2);
|
||||
String hcode= buffers[0].toString();
|
||||
String scode= buffers[1].toString();
|
||||
|
|
Loading…
Add table
Reference in a new issue