Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java7
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeArrayType.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositePointerType.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeQualifierType.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeScope.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CCompositesFactory.java9
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCEnumeration.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPPointerToMemberType.java5
12 files changed, 28 insertions, 30 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java
index 56f2b8d219..1c15412ac5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java
@@ -77,9 +77,10 @@ public abstract class AbstractCompositeFactory implements ICompositesFactory {
* context) which is equivalent to the specified binding. If no definition is found,
* a declaration is returned if <code>allowDeclaration</code> is set, otherwise an
* arbitrary binding is returned if available.
- * @param index
- * @param binding
- * @return
+ * @param binding the binding to find a representative for
+ * @param allowDeclaration whether declarations should be considered when a definition is
+ * unavailable
+ * @return the representative binding as defined above
*/
protected IIndexFragmentBinding findOneBinding(IBinding binding, boolean allowDeclaration) {
try{
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeArrayType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeArrayType.java
index 1af61227bd..76d4326b3b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeArrayType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeArrayType.java
@@ -16,7 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IArrayType;
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
import org.eclipse.cdt.internal.core.index.ArrayTypeClone;
-public class CompositeArrayType extends CompositeTypeContainer implements IArrayType, ITypeContainer {
+public class CompositeArrayType extends CompositeTypeContainer implements IArrayType {
public CompositeArrayType(IArrayType arrayType, ICompositesFactory cf) {
super((ITypeContainer) arrayType, cf);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java
index 7858b8a133..23449d2365 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java
@@ -15,7 +15,7 @@ import org.eclipse.cdt.core.dom.ast.IFunctionType;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.internal.core.index.IIndexType;
-public class CompositeFunctionType extends CompositeType implements IFunctionType, IIndexType {
+public class CompositeFunctionType extends CompositeType implements IFunctionType {
public CompositeFunctionType(IFunctionType rtype, ICompositesFactory cf) {
super(rtype, cf);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositePointerType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositePointerType.java
index e2e3953e4b..6827591aec 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositePointerType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositePointerType.java
@@ -16,7 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
import org.eclipse.cdt.internal.core.index.PointerTypeClone;
-public class CompositePointerType extends CompositeTypeContainer implements IPointerType, ITypeContainer {
+public class CompositePointerType extends CompositeTypeContainer implements IPointerType {
public CompositePointerType(IPointerType pointerType, ICompositesFactory cf) throws DOMException {
super((ITypeContainer) pointerType, cf);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeQualifierType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeQualifierType.java
index c7814328af..51ecefd7a8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeQualifierType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeQualifierType.java
@@ -16,7 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
import org.eclipse.cdt.internal.core.index.QualifierTypeClone;
-public class CompositeQualifierType extends CompositeTypeContainer implements IQualifierType, ITypeContainer {
+public class CompositeQualifierType extends CompositeTypeContainer implements IQualifierType {
public CompositeQualifierType(IQualifierType qualifierType, ICompositesFactory cf) throws DOMException {
super((ITypeContainer) qualifierType, cf);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeScope.java
index 47cc9cc958..2a7089b6c4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeScope.java
@@ -70,8 +70,8 @@ public abstract class CompositeScope implements IIndexScope {
/**
* For bindings that are not known statically to be index bindings, we must decide how to
* process them by run-time type. This method processes a single binding accordingly.
- * @param binding
- * @return
+ * @param binding a binding from the fragment layer
+ * @return a suitable binding at the composite layer
*/
protected final IBinding processUncertainBinding(IBinding binding) {
if(binding instanceof IIndexFragmentBinding) {
@@ -100,11 +100,13 @@ public abstract class CompositeScope implements IIndexScope {
* @return a non-null IBinding[]
*/
protected final IBinding[] processUncertainBindings(IBinding[] frgBindings) {
- IBinding[] result= new IBinding[frgBindings==null ? 0 : frgBindings.length];
- for(int i=0; i<result.length; i++) {
- result[i]= processUncertainBinding(frgBindings[i]);
+ if(frgBindings != null) {
+ IBinding[] result= new IBinding[frgBindings.length];
+ for(int i=0; i<result.length; i++) {
+ result[i]= processUncertainBinding(frgBindings[i]);
+ }
}
- return result;
+ return IBinding.EMPTY_BINDING_ARRAY;
}
public final IBinding getBinding(IASTName name, boolean resolve) throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CCompositesFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CCompositesFactory.java
index 9be1886074..bd1f626609 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CCompositesFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CCompositesFactory.java
@@ -40,15 +40,14 @@ import org.eclipse.cdt.internal.core.index.composite.CompositeMacroContainer;
import org.eclipse.cdt.internal.core.index.composite.CompositePointerType;
import org.eclipse.cdt.internal.core.index.composite.CompositeQualifierType;
import org.eclipse.cdt.internal.core.index.composite.CompositingNotImplementedError;
-import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
-public class CCompositesFactory extends AbstractCompositeFactory implements ICompositesFactory {
+public class CCompositesFactory extends AbstractCompositeFactory {
public CCompositesFactory(IIndex index) {
super(index);
}
- /* (non-Javadoc)
+ /*
* @see org.eclipse.cdt.internal.core.index.composite.cpp.ICompositesFactory#getCompositeScope(org.eclipse.cdt.core.index.IIndex, org.eclipse.cdt.core.dom.ast.IScope)
*/
public IIndexScope getCompositeScope(IIndexScope rscope) {
@@ -66,7 +65,7 @@ public class CCompositesFactory extends AbstractCompositeFactory implements ICom
throw new CompositingNotImplementedError();
}
- /* (non-Javadoc)
+ /*
* @see org.eclipse.cdt.internal.core.index.composite.cpp.ICompositesFactory#getCompositeType(org.eclipse.cdt.core.index.IIndex, org.eclipse.cdt.core.dom.ast.IType)
*/
public IType getCompositeType(IIndexType rtype) throws DOMException {
@@ -98,7 +97,7 @@ public class CCompositesFactory extends AbstractCompositeFactory implements ICom
}
- /* (non-Javadoc)
+ /*
* @see org.eclipse.cdt.internal.core.index.composite.cpp.ICompositesFactory#getCompositeBinding(org.eclipse.cdt.core.index.IIndex, org.eclipse.cdt.core.dom.ast.IBinding)
*/
public IIndexBinding getCompositeBinding(IIndexFragmentBinding rbinding) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCEnumeration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCEnumeration.java
index 4dcf613cdf..0a18322fa0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCEnumeration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCEnumeration.java
@@ -14,12 +14,11 @@ import org.eclipse.cdt.core.dom.ast.DOMException;
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.index.IIndexBinding;
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 CompositeCEnumeration extends CompositeCBinding implements IIndexBinding, IEnumeration, IIndexType {
+class CompositeCEnumeration extends CompositeCBinding implements IEnumeration, IIndexType {
public CompositeCEnumeration(ICompositesFactory cf, IIndexFragmentBinding rbinding) {
super(cf, rbinding);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java
index 12531409b3..6748c8fc2e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java
@@ -15,12 +15,11 @@ import org.eclipse.cdt.core.dom.ast.ICompositeType;
import org.eclipse.cdt.core.dom.ast.IField;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType;
-import org.eclipse.cdt.core.index.IIndexBinding;
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 CompositeCStructure extends CompositeCBinding implements IIndexBinding, ICompositeType, IIndexType {
+class CompositeCStructure extends CompositeCBinding implements ICompositeType, IIndexType {
public CompositeCStructure(ICompositesFactory cf, IIndexFragmentBinding rbinding) {
super(cf, rbinding);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java
index d49e54f5e5..4733a18364 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java
@@ -14,12 +14,10 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
import org.eclipse.cdt.core.parser.util.ObjectMap;
-import org.eclipse.cdt.internal.core.index.IIndexType;
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
-public class CompositeCPPClassSpecialization extends CompositeCPPClassType implements
- IIndexType, ICPPSpecialization {
-
+public class CompositeCPPClassSpecialization extends CompositeCPPClassType implements ICPPSpecialization {
+
public CompositeCPPClassSpecialization(ICompositesFactory cf, ICPPClassType rbinding) {
super(cf, rbinding);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
index 00eefa7fb0..58d87c6bec 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
@@ -18,8 +18,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
import org.eclipse.cdt.core.parser.util.ObjectMap;
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
-public class CompositeCPPFunctionSpecialization extends CompositeCPPFunction
-implements ICPPFunction, ICPPSpecialization {
+public class CompositeCPPFunctionSpecialization extends CompositeCPPFunction implements ICPPSpecialization {
public CompositeCPPFunctionSpecialization(ICompositesFactory cf, ICPPFunction ft) {
super(cf, ft);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPPointerToMemberType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPPointerToMemberType.java
index b43dfcdcf8..2960083d21 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPPointerToMemberType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPPointerToMemberType.java
@@ -14,14 +14,15 @@ import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType;
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
-import org.eclipse.cdt.internal.core.index.IIndexType;
import org.eclipse.cdt.internal.core.index.composite.CompositePointerType;
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
-class CompositeCPPPointerToMemberType extends CompositePointerType implements IIndexType, ICPPPointerToMemberType {
+class CompositeCPPPointerToMemberType extends CompositePointerType implements ICPPPointerToMemberType {
+
CompositeCPPPointerToMemberType(ICompositesFactory cf, ICPPPointerToMemberType pointerToMemberType) throws DOMException {
super(pointerToMemberType, cf);
}
+
public ICPPClassType getMemberOfClass() {
IIndexFragmentBinding rbinding = (IIndexFragmentBinding) ((ICPPPointerToMemberType) type).getMemberOfClass();
return (ICPPClassType) cf.getCompositeBinding(rbinding);

Back to the top