Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferguson2008-04-01 14:03:41 +0000
committerAndrew Ferguson2008-04-01 14:03:41 +0000
commit1aa23a4f5d199e4115b75f17dd06d8d32d853759 (patch)
treed240af57248dc3b32d68ca16a5be683bec692e0c /core/org.eclipse.cdt.core/parser
parentd0325299ce2033337892996e1b49e74bff20560e (diff)
downloadorg.eclipse.cdt-1aa23a4f5d199e4115b75f17dd06d8d32d853759.tar.gz
org.eclipse.cdt-1aa23a4f5d199e4115b75f17dd06d8d32d853759.tar.xz
org.eclipse.cdt-1aa23a4f5d199e4115b75f17dd06d8d32d853759.zip
clean up warnings
Diffstat (limited to 'core/org.eclipse.cdt.core/parser')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/MacroContainerCollector.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCBasicType.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCEnumerator.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunction.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunctionType.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCTypedef.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCVariable.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBasicType.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBinding.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplateSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java7
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorInstance.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplate.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplateSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredFunctionInstance.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFieldSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java7
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionInstance.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionTemplateSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionType.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPInstance.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPParameterSpecialization.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPPointerToMemberType.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPReferenceType.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTypedefSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java9
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMClassUtil.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/GeneratePDOMApplication.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/DeltaAnalyzer.java18
46 files changed, 129 insertions, 68 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java
index 0c737e890a7..fb46e3b9332 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java
@@ -122,9 +122,10 @@ public class DBProperties {
/**
* Deletes all properties, does not delete the record associated with the object itself - that is
- * it can be repopulated.
+ * it can be re-populated.
* @throws CoreException
*/
+ @SuppressWarnings("hiding")
public void clear() throws CoreException {
index.accept(new IBTreeVisitor(){
public int compare(int record) throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/MacroContainerCollector.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/MacroContainerCollector.java
index 17bc033d94c..0507df21f9b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/MacroContainerCollector.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/MacroContainerCollector.java
@@ -57,8 +57,8 @@ public final class MacroContainerCollector implements IBTreeVisitor {
final public int compare(int record) throws CoreException {
if (monitor != null)
checkCancelled();
- IString name= PDOMNamedNode.getDBName(pdom, record);
- return compare(name);
+ IString rhsName= PDOMNamedNode.getDBName(pdom, record);
+ return compare(rhsName);
}
private int compare(IString rhsName) throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java
index 4717bec5147..a25aa8ab89b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/NamedNodeCollector.java
@@ -70,8 +70,8 @@ public class NamedNodeCollector implements IBTreeVisitor, IPDOMVisitor {
final public int compare(int record) throws CoreException {
if (monitor != null)
checkCancelled();
- IString name= PDOMNamedNode.getDBName(linkage.getPDOM(), record);
- return compare(name);
+ IString rhsName= PDOMNamedNode.getDBName(linkage.getPDOM(), record);
+ return compare(rhsName);
}
private int compare(IString rhsName) throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java
index f8d8f15454f..4741af1631a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java
@@ -546,7 +546,8 @@ public class PDOMFile implements IIndexFragmentFile {
}
return records;
}
-
+
+ @SuppressWarnings("hiding")
public int compare(int record) throws CoreException {
IString name = db.getString(db.getInt(record + PDOMFile.LOCATION_REPRESENTATION));
int cmp= name.compare(rawKey, true);
@@ -555,7 +556,8 @@ public class PDOMFile implements IIndexFragmentFile {
}
return cmp;
}
-
+
+ @SuppressWarnings("hiding")
public boolean visit(int record) throws CoreException {
if (linkageID >= 0) {
this.record = record;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
index 013602bca85..a441eb6dff4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
@@ -119,6 +119,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
}
@Override
+ @SuppressWarnings("hiding")
public void accept(final IPDOMVisitor visitor) throws CoreException {
if (visitor instanceof IBTreeVisitor) {
getIndex().accept((IBTreeVisitor) visitor);
@@ -150,6 +151,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
getIndex().insert(child.getRecord());
}
+ @SuppressWarnings("hiding")
public PDOMNode getNode(int record) throws CoreException {
switch (PDOMNode.getNodeType(pdom, record)) {
case POINTER_TYPE:
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCBasicType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCBasicType.java
index 858d125a711..61babbafd24 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCBasicType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCBasicType.java
@@ -20,6 +20,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
import org.eclipse.cdt.core.dom.ast.c.ICBasicType;
import org.eclipse.cdt.internal.core.Util;
+import org.eclipse.cdt.internal.core.index.IIndexCBindingConstants;
import org.eclipse.cdt.internal.core.index.IIndexType;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.Database;
@@ -35,6 +36,7 @@ class PDOMCBasicType extends PDOMNode implements ICBasicType, IIndexType {
public static final int TYPE_ID = PDOMNode.RECORD_SIZE + 0; // short
public static final int FLAGS = PDOMNode.RECORD_SIZE + 2; // short
+ @SuppressWarnings("hiding")
public static final int RECORD_SIZE = PDOMNode.RECORD_SIZE + 4;
public static final int IS_LONG = 0x1;
@@ -77,7 +79,7 @@ class PDOMCBasicType extends PDOMNode implements ICBasicType, IIndexType {
}
public int getNodeType() {
- return PDOMCLinkage.CBASICTYPE;
+ return IIndexCBindingConstants.CBASICTYPE;
}
public int getType() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCEnumerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCEnumerator.java
index ea30788e1cb..6ad21b9dd5a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCEnumerator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCEnumerator.java
@@ -15,6 +15,7 @@ import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.IEnumerator;
import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.internal.core.index.IIndexCBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -29,6 +30,7 @@ class PDOMCEnumerator extends PDOMBinding implements IEnumerator {
private static final int ENUMERATION = PDOMBinding.RECORD_SIZE + 0;
private static final int NEXT_ENUMERATOR = PDOMBinding.RECORD_SIZE + 4;
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 8;
public PDOMCEnumerator(PDOM pdom, PDOMNode parent, IEnumerator enumerator, PDOMCEnumeration enumeration)
@@ -47,7 +49,7 @@ class PDOMCEnumerator extends PDOMBinding implements IEnumerator {
}
public int getNodeType() {
- return PDOMCLinkage.CENUMERATOR;
+ return IIndexCBindingConstants.CENUMERATOR;
}
public PDOMCEnumerator getNextEnumerator() throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunction.java
index d00884cd4d0..e4ed6b03902 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunction.java
@@ -22,6 +22,7 @@ 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.internal.core.Util;
+import org.eclipse.cdt.internal.core.index.IIndexCBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage;
@@ -60,6 +61,7 @@ class PDOMCFunction extends PDOMBinding implements IFunction {
/**
* The size in bytes of a PDOMCPPFunction record in the database.
*/
+ @SuppressWarnings("hiding")
public static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 13;
public PDOMCFunction(PDOM pdom, PDOMNode parent, IFunction function) throws CoreException {
@@ -148,7 +150,7 @@ class PDOMCFunction extends PDOMBinding implements IFunction {
}
public int getNodeType() {
- return PDOMCLinkage.CFUNCTION;
+ return IIndexCBindingConstants.CFUNCTION;
}
public IFunctionType getType() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunctionType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunctionType.java
index fb7a8048a0f..2fc9a1a8502 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunctionType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCFunctionType.java
@@ -24,6 +24,7 @@ import org.eclipse.cdt.core.dom.ast.IFunctionType;
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.internal.core.index.IIndexCBindingConstants;
import org.eclipse.cdt.internal.core.index.IIndexType;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
@@ -48,6 +49,7 @@ public class PDOMCFunctionType extends PDOMNode implements IIndexType, IFunction
/**
* The size in bytes of a PDOMCFunctionType record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE= PDOMNode.RECORD_SIZE + 8;
public PDOMCFunctionType(PDOM pdom, int record) {
@@ -94,7 +96,7 @@ public class PDOMCFunctionType extends PDOMNode implements IIndexType, IFunction
}
public int getNodeType() {
- return PDOMCLinkage.CFUNCTIONTYPE;
+ return IIndexCBindingConstants.CFUNCTIONTYPE;
}
protected int getRecordSize() {
@@ -144,12 +146,12 @@ public class PDOMCFunctionType extends PDOMNode implements IIndexType, IFunction
public IType[] getParameterTypes() {
- final List result= new ArrayList();
+ final List<IType> result= new ArrayList<IType>();
try {
PDOMNodeLinkedList list = new PDOMNodeLinkedList(pdom, record + TYPELIST, getLinkageImpl(), true);
list.accept(new IPDOMVisitor(){
public void leave(IPDOMNode node) throws CoreException {
- result.add(node);
+ result.add((IType)node);
}
public boolean visit(IPDOMNode node) throws CoreException {
return false;
@@ -158,7 +160,7 @@ public class PDOMCFunctionType extends PDOMNode implements IIndexType, IFunction
} catch(CoreException ce) {
CCorePlugin.log(ce);
}
- return (IType[]) result.toArray(new IType[result.size()]);
+ return result.toArray(new IType[result.size()]);
}
public IType getReturnType() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java
index 394b60b08ba..051b5f233bf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java
@@ -272,6 +272,7 @@ class PDOMCLinkage extends PDOMLinkage implements IIndexCBindingConstants {
return null;
}
+ @SuppressWarnings("hiding")
public PDOMNode getNode(int record) throws CoreException {
if (record == 0)
return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCTypedef.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCTypedef.java
index 231a5739cb4..2bce7015221 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCTypedef.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCTypedef.java
@@ -36,6 +36,7 @@ class PDOMCTypedef extends PDOMBinding implements ITypedef, ITypeContainer, IInd
private static final int TYPE = PDOMBinding.RECORD_SIZE + 0;
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 4;
public PDOMCTypedef(PDOM pdom, PDOMNode parent, ITypedef typedef)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCVariable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCVariable.java
index 71e5b3c6038..022ab4ccd38 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCVariable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCVariable.java
@@ -49,6 +49,7 @@ class PDOMCVariable extends PDOMBinding implements IVariable {
/**
* The size in bytes of a PDOMCVariable record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 5;
public PDOMCVariable(PDOM pdom, PDOMNode parent, IVariable variable) throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBasicType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBasicType.java
index 67dda132b9e..088cfb001be 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBasicType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBasicType.java
@@ -36,6 +36,7 @@ class PDOMCPPBasicType extends PDOMNode implements ICPPBasicType, IIndexType {
public static final int TYPE_ID = PDOMNode.RECORD_SIZE + 0; // short
public static final int FLAGS = PDOMNode.RECORD_SIZE + 2; // short
+ @SuppressWarnings("hiding")
public static final int RECORD_SIZE = PDOMNode.RECORD_SIZE + 4;
protected short fFlags= -1;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBinding.java
index 3f89f5c5c48..5d81c73ceb7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBinding.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBinding.java
@@ -29,6 +29,10 @@ import org.eclipse.core.runtime.CoreException;
* Mirrors type-hierarchy from DOM interfaces
*/
abstract class PDOMCPPBinding extends PDOMBinding implements ICPPBinding {
+
+ @SuppressWarnings("hiding")
+ protected static final int RECORD_SIZE= PDOMBinding.RECORD_SIZE + 0;
+
public PDOMCPPBinding(PDOM pdom, int record) {
super(pdom, record);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java
index eac44567fe6..dba76282eed 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java
@@ -29,6 +29,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
import org.eclipse.cdt.core.parser.util.ObjectMap;
import org.eclipse.cdt.internal.core.Util;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.index.IndexCPPSignatureUtil;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
@@ -52,6 +53,7 @@ class PDOMCPPClassTemplatePartialSpecialization extends
/**
* The size in bytes of a PDOMCPPClassTemplatePartialSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPClassTemplate.RECORD_SIZE + 16;
public PDOMCPPClassTemplatePartialSpecialization(PDOM pdom,
@@ -82,7 +84,7 @@ class PDOMCPPClassTemplatePartialSpecialization extends
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_CLASS_TEMPLATE_PARTIAL_SPEC;
+ return IIndexCPPBindingConstants.CPP_CLASS_TEMPLATE_PARTIAL_SPEC;
}
public PDOMCPPClassTemplatePartialSpecialization getNextPartial() throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplateSpecialization.java
index b997d8eda6a..e1ce3fc32a3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplateSpecialization.java
@@ -28,6 +28,7 @@ import org.eclipse.cdt.core.parser.util.ObjectMap;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredClassInstance;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalTemplateInstantiator;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
@@ -47,6 +48,7 @@ class PDOMCPPClassTemplateSpecialization extends
/**
* The size in bytes of a PDOMCPPClassTemplateSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPClassSpecialization.RECORD_SIZE + 8;
public PDOMCPPClassTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPClassTemplate template, PDOMBinding specialized)
@@ -63,7 +65,7 @@ class PDOMCPPClassTemplateSpecialization extends
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_CLASS_TEMPLATE_SPECIALIZATION;
+ return IIndexCPPBindingConstants.CPP_CLASS_TEMPLATE_SPECIALIZATION;
}
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java
index 0e5de032ce0..7705991e870 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java
@@ -65,13 +65,12 @@ import org.eclipse.core.runtime.CoreException;
class PDOMCPPClassType extends PDOMCPPBinding implements ICPPClassType,
ICPPClassScope, IPDOMMemberOwner, IIndexType, IIndexScope {
- @SuppressWarnings("static-access")
private static final int FIRSTBASE = PDOMCPPBinding.RECORD_SIZE + 0;
- @SuppressWarnings("static-access")
+
private static final int KEY = PDOMCPPBinding.RECORD_SIZE + 4; // byte
- @SuppressWarnings("static-access")
+
private static final int MEMBERLIST = PDOMCPPBinding.RECORD_SIZE + 8;
- @SuppressWarnings({ "static-access", "hiding" })
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 12;
public PDOMCPPClassType(PDOM pdom, PDOMNode parent, ICPPClassType classType)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorInstance.java
index f2397d57fc2..b95a8721805 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorInstance.java
@@ -13,6 +13,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -28,6 +29,7 @@ public class PDOMCPPConstructorInstance extends PDOMCPPMethodInstance implements
/**
* The size in bytes of a PDOMCPPConstructorInstance record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPMethodInstance.RECORD_SIZE + 0;
public PDOMCPPConstructorInstance(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding instantiated)
@@ -44,7 +46,7 @@ public class PDOMCPPConstructorInstance extends PDOMCPPMethodInstance implements
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_CONSTRUCTOR_INSTANCE;
+ return IIndexCPPBindingConstants.CPP_CONSTRUCTOR_INSTANCE;
}
public boolean isExplicit() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorSpecialization.java
index 2bafed4836d..018c319d6a9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorSpecialization.java
@@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -27,6 +28,7 @@ class PDOMCPPConstructorSpecialization extends
/**
* The size in bytes of a PDOMCPPConstructorSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPMethodSpecialization.RECORD_SIZE + 0;
public PDOMCPPConstructorSpecialization(PDOM pdom, PDOMNode parent, ICPPConstructor constructor, PDOMBinding specialized) throws CoreException {
@@ -42,7 +44,7 @@ class PDOMCPPConstructorSpecialization extends
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_CONSTRUCTOR_SPECIALIZATION;
+ return IIndexCPPBindingConstants.CPP_CONSTRUCTOR_SPECIALIZATION;
}
public boolean isExplicit() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplate.java
index d3d5222002b..05b33fe576e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplate.java
@@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
import org.eclipse.core.runtime.CoreException;
@@ -36,6 +37,6 @@ class PDOMCPPConstructorTemplate extends PDOMCPPMethodTemplate implements
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_CONSTRUCTOR_TEMPLATE;
+ return IIndexCPPBindingConstants.CPP_CONSTRUCTOR_TEMPLATE;
}
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplateSpecialization.java
index bd21b3412e1..3fa36dc5aaa 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPConstructorTemplateSpecialization.java
@@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -27,6 +28,7 @@ class PDOMCPPConstructorTemplateSpecialization extends
/**
* The size in bytes of a PDOMCPPConstructorTemplateSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPMethodTemplateSpecialization.RECORD_SIZE + 0;
public PDOMCPPConstructorTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPConstructor constructor, PDOMBinding specialized)
@@ -43,7 +45,7 @@ class PDOMCPPConstructorTemplateSpecialization extends
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_CONSTRUCTOR_TEMPLATE_SPECIALIZATION;
+ return IIndexCPPBindingConstants.CPP_CONSTRUCTOR_TEMPLATE_SPECIALIZATION;
}
public boolean isExplicit() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java
index f6cf73df756..c971cf0069a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java
@@ -27,6 +27,7 @@ import org.eclipse.cdt.core.parser.util.ObjectMap;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalDeferredClassInstance;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalTemplateInstantiator;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.index.IIndexType;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
@@ -43,6 +44,7 @@ class PDOMCPPDeferredClassInstance extends PDOMCPPInstance implements
/**
* The size in bytes of a PDOMCPPDeferredClassInstance record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPInstance.RECORD_SIZE + 0;
public PDOMCPPDeferredClassInstance(PDOM pdom, PDOMNode parent, ICPPClassType classType, PDOMBinding instantiated)
@@ -59,7 +61,7 @@ class PDOMCPPDeferredClassInstance extends PDOMCPPInstance implements
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_DEFERRED_CLASS_INSTANCE;
+ return IIndexCPPBindingConstants.CPP_DEFERRED_CLASS_INSTANCE;
}
public ICPPBase[] getBases() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredFunctionInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredFunctionInstance.java
index 008e7d86897..0da29b5fdc8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredFunctionInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredFunctionInstance.java
@@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDeferredTemplateInstance;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -27,6 +28,7 @@ class PDOMCPPDeferredFunctionInstance extends PDOMCPPFunctionInstance
/**
* The size in bytes of a PDOMCPPDeferredFunctionInstance record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPFunctionInstance.RECORD_SIZE + 0;
public PDOMCPPDeferredFunctionInstance(PDOM pdom, PDOMNode parent, ICPPFunction function, PDOMBinding instantiated)
@@ -43,6 +45,6 @@ class PDOMCPPDeferredFunctionInstance extends PDOMCPPFunctionInstance
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_DEFERRED_FUNCTION_INSTANCE;
+ return IIndexCPPBindingConstants.CPP_DEFERRED_FUNCTION_INSTANCE;
}
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFieldSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFieldSpecialization.java
index 5fc47a29c0e..e4bf905caf3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFieldSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFieldSpecialization.java
@@ -19,6 +19,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
import org.eclipse.cdt.internal.core.Util;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -36,6 +37,7 @@ class PDOMCPPFieldSpecialization extends PDOMCPPSpecialization implements
/**
* The size in bytes of a PDOMCPPFieldSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
public PDOMCPPFieldSpecialization(PDOM pdom, PDOMNode parent,
@@ -63,7 +65,7 @@ class PDOMCPPFieldSpecialization extends PDOMCPPSpecialization implements
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_FIELD_SPECIALIZATION;
+ return IIndexCPPBindingConstants.CPP_FIELD_SPECIALIZATION;
}
private ICPPField getField() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java
index c32304e6d6e..49fcc5b56fe 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java
@@ -47,40 +47,35 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
* Offset of total number of function parameters (relative to the
* beginning of the record).
*/
- @SuppressWarnings("static-access")
private static final int NUM_PARAMS = PDOMCPPBinding.RECORD_SIZE + 0;
/**
* Offset of pointer to the first parameter of this function (relative to
* the beginning of the record).
*/
- @SuppressWarnings("static-access")
private static final int FIRST_PARAM = PDOMCPPBinding.RECORD_SIZE + 4;
/**
* Offset of pointer to the function type record of this function (relative to
* the beginning of the record).
*/
- @SuppressWarnings("static-access")
protected static final int FUNCTION_TYPE= PDOMCPPBinding.RECORD_SIZE + 8;
/**
* Offset of hash of parameter information to allow fast comparison
*/
- @SuppressWarnings("static-access")
private static final int SIGNATURE_MEMENTO = PDOMCPPBinding.RECORD_SIZE + 12;
/**
* Offset of annotation information (relative to the beginning of the
* record).
*/
- @SuppressWarnings("static-access")
protected static final int ANNOTATION = PDOMCPPBinding.RECORD_SIZE + 16; // byte
/**
* The size in bytes of a PDOMCPPFunction record in the database.
*/
- @SuppressWarnings({ "static-access", "hiding" })
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 17;
public PDOMCPPFunction(PDOM pdom, PDOMNode parent, ICPPFunction function, boolean setTypes) throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionInstance.java
index f2f3ba7aa2e..9d3ea8c2143 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionInstance.java
@@ -23,6 +23,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
import org.eclipse.cdt.internal.core.Util;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.Database;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
@@ -55,6 +56,7 @@ class PDOMCPPFunctionInstance extends PDOMCPPInstance implements ICPPFunction {
/**
* The size in bytes of a PDOMCPPFunctionInstance record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPInstance.RECORD_SIZE + 12;
public PDOMCPPFunctionInstance(PDOM pdom, PDOMNode parent, ICPPFunction function, PDOMBinding instantiated)
@@ -100,7 +102,7 @@ class PDOMCPPFunctionInstance extends PDOMCPPInstance implements ICPPFunction {
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_FUNCTION_INSTANCE;
+ return IIndexCPPBindingConstants.CPP_FUNCTION_INSTANCE;
}
public PDOMCPPParameterSpecialization getFirstParameter() throws CoreException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionTemplateSpecialization.java
index 89addf3d818..5323f504687 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionTemplateSpecialization.java
@@ -25,6 +25,7 @@ import org.eclipse.cdt.core.parser.util.ObjectMap;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredFunctionInstance;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalTemplateInstantiator;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
import org.eclipse.cdt.internal.core.pdom.dom.IPDOMMemberOwner;
@@ -46,6 +47,7 @@ class PDOMCPPFunctionTemplateSpecialization extends
/**
* The size in bytes of a PDOMCPPFunctionTemplateSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPFunctionSpecialization.RECORD_SIZE + 8;
public PDOMCPPFunctionTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPFunctionTemplate template, PDOMBinding specialized)
@@ -62,7 +64,7 @@ class PDOMCPPFunctionTemplateSpecialization extends
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_FUNCTION_TEMPLATE_SPECIALIZATION;
+ return IIndexCPPBindingConstants.CPP_FUNCTION_TEMPLATE_SPECIALIZATION;
}
public ICPPTemplateParameter[] getTemplateParameters() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionType.java
index 70254576dbf..db024a8de07 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunctionType.java
@@ -13,6 +13,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
import org.eclipse.cdt.internal.core.pdom.dom.c.PDOMCAnnotation;
@@ -29,6 +30,7 @@ public class PDOMCPPFunctionType extends PDOMCFunctionType implements ICPPFuncti
/**
* The size in bytes of a PDOMCFunctionType record in the database.
*/
+ @SuppressWarnings("hiding")
private static final int RECORD_SIZE= PDOMCFunctionType.RECORD_SIZE+ 4;
protected PDOMCPPFunctionType(PDOM pdom, int offset) {
@@ -67,7 +69,7 @@ public class PDOMCPPFunctionType extends PDOMCFunctionType implements ICPPFuncti
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_FUNCTION_TYPE;
+ return IIndexCPPBindingConstants.CPP_FUNCTION_TYPE;
}
public String toString() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPInstance.java
index b6079dda1b3..35497f38ed0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPInstance.java
@@ -37,6 +37,7 @@ abstract class PDOMCPPInstance extends PDOMCPPSpecialization implements
/**
* The size in bytes of a PDOMCPPInstance record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
public PDOMCPPInstance(PDOM pdom, PDOMNode parent, ICPPTemplateInstance inst, PDOMBinding instantiated)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
index 0f8b2c347a9..57b0ac5c8ca 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
@@ -744,6 +744,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
}
@Override
+ @SuppressWarnings("hiding")
public PDOMNode getNode(int record) throws CoreException {
if (record == 0)
return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java
index a8153c5951f..a125507e955 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodInstance.java
@@ -14,6 +14,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
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.ICPPMethod;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -29,6 +30,7 @@ class PDOMCPPMethodInstance extends PDOMCPPFunctionInstance implements
/**
* The size in bytes of a PDOMCPPMethodInstance record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPFunctionInstance.RECORD_SIZE + 0;
public PDOMCPPMethodInstance(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding instantiated)
@@ -45,7 +47,7 @@ class PDOMCPPMethodInstance extends PDOMCPPFunctionInstance implements
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_METHOD_INSTANCE;
+ return IIndexCPPBindingConstants.CPP_METHOD_INSTANCE;
}
public boolean isDestructor() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java
index bb8d62ef588..68b1859c90a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodSpecialization.java
@@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
import org.eclipse.cdt.internal.core.Util;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.Database;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
@@ -39,6 +40,7 @@ class PDOMCPPMethodSpecialization extends PDOMCPPFunctionSpecialization
/**
* The size in bytes of a PDOMCPPMethodSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPFunctionSpecialization.RECORD_SIZE + 1;
/**
@@ -70,7 +72,7 @@ class PDOMCPPMethodSpecialization extends PDOMCPPFunctionSpecialization
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_METHOD_SPECIALIZATION;
+ return IIndexCPPBindingConstants.CPP_METHOD_SPECIALIZATION;
}
public boolean isDestructor() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java
index f8b0551a1a0..b42884494fe 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplate.java
@@ -18,6 +18,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
import org.eclipse.cdt.internal.core.Util;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.Database;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -40,6 +41,7 @@ class PDOMCPPMethodTemplate extends PDOMCPPFunctionTemplate implements
/**
* The size in bytes of a PDOMCPPMethodTemplate record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPFunctionTemplate.RECORD_SIZE + 1;
/**
@@ -73,7 +75,7 @@ class PDOMCPPMethodTemplate extends PDOMCPPFunctionTemplate implements
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_METHOD_TEMPLATE;
+ return IIndexCPPBindingConstants.CPP_METHOD_TEMPLATE;
}
public boolean isDestructor() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java
index dc4d2c7dce8..f6295995286 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMethodTemplateSpecialization.java
@@ -16,6 +16,7 @@ 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.ICPPFunctionTemplate;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
@@ -31,6 +32,7 @@ class PDOMCPPMethodTemplateSpecialization extends
/**
* The size in bytes of a PDOMCPPMethodTemplateSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPFunctionTemplateSpecialization.RECORD_SIZE + 0;
public PDOMCPPMethodTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding specialized)
@@ -47,7 +49,7 @@ class PDOMCPPMethodTemplateSpecialization extends
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_METHOD_TEMPLATE_SPECIALIZATION;
+ return IIndexCPPBindingConstants.CPP_METHOD_TEMPLATE_SPECIALIZATION;
}
public boolean isDestructor() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java
index 119e5fd1c2f..247a02ad3de 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespace.java
@@ -74,6 +74,7 @@ class PDOMCPPNamespace extends PDOMCPPBinding
}
@Override
+ @SuppressWarnings("hiding")
public void accept(final IPDOMVisitor visitor) throws CoreException {
if (visitor instanceof IBTreeVisitor) {
getIndex().accept((IBTreeVisitor) visitor);
@@ -176,6 +177,7 @@ class PDOMCPPNamespace extends PDOMCPPBinding
return true;
}
+ @SuppressWarnings("hiding")
public IBinding[] getMemberBindings() throws DOMException {
IBinding[] result = null;
final List<PDOMNode> preresult = new ArrayList<PDOMNode>();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java
index c9560e2575f..ae4b3d77648 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPNamespaceAlias.java
@@ -31,9 +31,8 @@ import org.eclipse.core.runtime.CoreException;
*/
class PDOMCPPNamespaceAlias extends PDOMCPPBinding implements ICPPNamespaceAlias {
- @SuppressWarnings("static-access")
private static final int NAMESPACE_BINDING = PDOMCPPBinding.RECORD_SIZE + 0;
- @SuppressWarnings({ "hiding", "static-access" })
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 4;
public PDOMCPPNamespaceAlias(PDOM pdom, PDOMNode parent, ICPPNamespaceAlias alias)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPParameterSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPParameterSpecialization.java
index cdd83b308d3..257130d28e3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPParameterSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPParameterSpecialization.java
@@ -43,6 +43,7 @@ class PDOMCPPParameterSpecialization extends PDOMCPPSpecialization implements IC
/**
* The size in bytes of a PDOMCPPParameterSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 8;
public PDOMCPPParameterSpecialization(PDOM pdom, PDOMNode parent, ICPPParameter param, PDOMCPPParameter specialized, int typeRecord)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPPointerToMemberType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPPointerToMemberType.java
index 4943add279b..9472e41e2a9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPPointerToMemberType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPPointerToMemberType.java
@@ -15,6 +15,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.CCorePlugin;
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.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.index.IIndexType;
import org.eclipse.cdt.internal.core.index.PointerTypeClone;
import org.eclipse.cdt.internal.core.pdom.PDOM;
@@ -28,6 +29,7 @@ class PDOMCPPPointerToMemberType extends PDOMPointerType
implements ICPPPointerToMemberType, IIndexType {
private static final int TYPE = PDOMPointerType.RECORD_SIZE;
+ @SuppressWarnings("hiding")
private static final int RECORD_SIZE= TYPE+4;
public PDOMCPPPointerToMemberType(PDOM pdom, int record) {
@@ -54,7 +56,7 @@ implements ICPPPointerToMemberType, IIndexType {
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_POINTER_TO_MEMBER_TYPE;
+ return IIndexCPPBindingConstants.CPP_POINTER_TO_MEMBER_TYPE;
}
public ICPPClassType getMemberOfClass() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPReferenceType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPReferenceType.java
index 93283f563f4..39522cdd03a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPReferenceType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPReferenceType.java
@@ -21,6 +21,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
import org.eclipse.cdt.internal.core.Util;
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
import org.eclipse.cdt.internal.core.index.CPPReferenceTypeClone;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.index.IIndexType;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.Database;
@@ -34,6 +35,7 @@ class PDOMCPPReferenceType extends PDOMNode implements ICPPReferenceType,
private static final int TYPE = PDOMNode.RECORD_SIZE + 0;
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMNode.RECORD_SIZE + 4;
public PDOMCPPReferenceType(PDOM pdom, int record) {
@@ -65,7 +67,7 @@ class PDOMCPPReferenceType extends PDOMNode implements ICPPReferenceType,
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_REFERENCE_TYPE;
+ return IIndexCPPBindingConstants.CPP_REFERENCE_TYPE;
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java
index 9cac379aa6b..c06113b4e43 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPSpecialization.java
@@ -46,6 +46,7 @@ abstract class PDOMCPPSpecialization extends PDOMCPPBinding implements
/**
* The size in bytes of a PDOMCPPSpecialization record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 16;
public PDOMCPPSpecialization(PDOM pdom, PDOMNode parent, ICPPSpecialization spec, PDOMNamedNode specialized)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java
index 1e26c13e392..1fafc5f6f7d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java
@@ -38,6 +38,7 @@ class PDOMCPPTemplateTypeParameter extends PDOMCPPBinding implements
/**
* The size in bytes of a PDOMCPPTemplateTypeParameter record in the database.
*/
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 4;
public PDOMCPPTemplateTypeParameter(PDOM pdom, PDOMNode parent,
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTypedefSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTypedefSpecialization.java
index 0829e3c4d56..18e3846a1da 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTypedefSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTypedefSpecialization.java
@@ -19,6 +19,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
import org.eclipse.cdt.internal.core.Util;
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
import org.eclipse.cdt.internal.core.index.CPPTypedefClone;
+import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
import org.eclipse.cdt.internal.core.index.IIndexType;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
@@ -35,6 +36,7 @@ class PDOMCPPTypedefSpecialization extends PDOMCPPSpecialization
private static final int TYPE = PDOMCPPSpecialization.RECORD_SIZE + 0;
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
public PDOMCPPTypedefSpecialization(PDOM pdom, PDOMNode parent, ITypedef typedef, PDOMBinding specialized)
@@ -60,7 +62,7 @@ class PDOMCPPTypedefSpecialization extends PDOMCPPSpecialization
}
public int getNodeType() {
- return PDOMCPPLinkage.CPP_TYPEDEF_SPECIALIZATION;
+ return IIndexCPPBindingConstants.CPP_TYPEDEF_SPECIALIZATION;
}
public IType getType() throws DOMException {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java
index f5c4dc05886..0fb3800d6b1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java
@@ -29,16 +29,19 @@ import org.eclipse.core.runtime.CoreException;
* @see ICPPUsingDeclaration
*/
class PDOMCPPUsingDeclaration extends PDOMCPPBinding implements ICPPUsingDeclaration {
- @SuppressWarnings("static-access")
+
private static final int TARGET_BINDING = PDOMCPPBinding.RECORD_SIZE + 0;
// Using declarations for functions may have multiple delegates. We model such case
// by creating a chain of PDOMCPPUsingDeclaration objects linked by NEXT_DELEGATE field.
- @SuppressWarnings("static-access")
+
private static final int NEXT_DELEGATE = PDOMCPPBinding.RECORD_SIZE + 4;
- @SuppressWarnings({ "hiding", "static-access" })
+
+ @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 8;
+
private IBinding[] delegates;
+ @SuppressWarnings("hiding")
public PDOMCPPUsingDeclaration(PDOM pdom, PDOMNode parent, ICPPUsingDeclaration using)
throws CoreException {
super(pdom, parent, using.getNameCharArray());
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMClassUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMClassUtil.java
index f9ab4531f25..6b1e5b64537 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMClassUtil.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMClassUtil.java
@@ -28,12 +28,12 @@ import org.eclipse.core.runtime.CoreException;
*/
class PDOMClassUtil {
static class FieldCollector implements IPDOMVisitor {
- private List fields = new ArrayList();
+ private List<ICPPField> fields = new ArrayList<ICPPField>();
public boolean visit(IPDOMNode node) throws CoreException {
if (node instanceof ICPPField) {
ICPPField field= (ICPPField) node;
if (IndexFilter.ALL_DECLARED_OR_IMPLICIT.acceptBinding(field)) {
- fields.add(node);
+ fields.add(field);
}
}
return false;
@@ -41,12 +41,12 @@ class PDOMClassUtil {
public void leave(IPDOMNode node) throws CoreException {
}
public ICPPField[] getFields() {
- return (ICPPField[])fields.toArray(new ICPPField[fields.size()]);
+ return fields.toArray(new ICPPField[fields.size()]);
}
}
static class ConstructorCollector implements IPDOMVisitor {
- private List fConstructors = new ArrayList();
+ private List<ICPPConstructor> fConstructors = new ArrayList<ICPPConstructor>();
public boolean visit(IPDOMNode node) throws CoreException {
if (node instanceof ICPPConstructor) {
ICPPConstructor cons= (ICPPConstructor) node;
@@ -59,19 +59,19 @@ class PDOMClassUtil {
public void leave(IPDOMNode node) throws CoreException {
}
public ICPPConstructor[] getConstructors() {
- return (ICPPConstructor[])fConstructors.toArray(new ICPPConstructor[fConstructors.size()]);
+ return fConstructors.toArray(new ICPPConstructor[fConstructors.size()]);
}
}
static class MethodCollector implements IPDOMVisitor {
- private final List methods;
+ private final List<ICPPMethod> methods;
private final boolean acceptNonImplicit;
private final IndexFilter filter;
public MethodCollector(boolean acceptImplicit) {
this(acceptImplicit, true);
}
public MethodCollector(boolean acceptImplicit, boolean acceptNonImplicit) {
- this.methods = new ArrayList();
+ this.methods = new ArrayList<ICPPMethod>();
this.acceptNonImplicit= acceptNonImplicit;
this.filter= acceptImplicit ? IndexFilter.ALL_DECLARED_OR_IMPLICIT : IndexFilter.ALL_DECLARED;
}
@@ -80,7 +80,7 @@ class PDOMClassUtil {
ICPPMethod method= (ICPPMethod) node;
if (filter.acceptBinding(method)) {
if (acceptNonImplicit || method.isImplicit()) {
- methods.add(node);
+ methods.add(method);
}
}
}
@@ -89,7 +89,7 @@ class PDOMClassUtil {
public void leave(IPDOMNode node) throws CoreException {
}
public ICPPMethod[] getMethods() {
- return (ICPPMethod[])methods.toArray(new ICPPMethod[methods.size()]);
+ return methods.toArray(new ICPPMethod[methods.size()]);
}
}
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/GeneratePDOMApplication.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/GeneratePDOMApplication.java
index 959134c21b1..781ba4496eb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/GeneratePDOMApplication.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/GeneratePDOMApplication.java
@@ -224,9 +224,9 @@ public class GeneratePDOMApplication implements IApplication {
public void worked(int work) {
internalWorked(work);
}
- public void beginTask(String name, int totalWork) {
+ public void beginTask(String name, int total) {
this.taskName = name;
- this.totalWork = totalWork;
+ this.totalWork = total;
}
public void internalWorked(double work) {
synchronized(mutex) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/DeltaAnalyzer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/DeltaAnalyzer.java
index 3f5b22d96ff..226e4056deb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/DeltaAnalyzer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/DeltaAnalyzer.java
@@ -23,9 +23,9 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
public class DeltaAnalyzer {
- private List fAdded= new ArrayList();
- private List fChanged= new ArrayList();
- private List fRemoved= new ArrayList();
+ private List<ITranslationUnit> fAdded= new ArrayList<ITranslationUnit>();
+ private List<ITranslationUnit> fChanged= new ArrayList<ITranslationUnit>();
+ private List<ITranslationUnit> fRemoved= new ArrayList<ITranslationUnit>();
public DeltaAnalyzer() {
}
@@ -73,27 +73,27 @@ public class DeltaAnalyzer {
}
}
- private void collectSources(ICContainer container, Collection sources) throws CoreException {
+ private void collectSources(ICContainer container, Collection<ITranslationUnit> sources) throws CoreException {
container.accept(new TranslationUnitCollector(sources, sources, new NullProgressMonitor()));
}
public ITranslationUnit[] getAddedTUs() {
- return (ITranslationUnit[]) fAdded.toArray(new ITranslationUnit[fAdded.size()]);
+ return fAdded.toArray(new ITranslationUnit[fAdded.size()]);
}
public ITranslationUnit[] getChangedTUs() {
- return (ITranslationUnit[]) fChanged.toArray(new ITranslationUnit[fChanged.size()]);
+ return fChanged.toArray(new ITranslationUnit[fChanged.size()]);
}
public ITranslationUnit[] getRemovedTUs() {
- return (ITranslationUnit[]) fRemoved.toArray(new ITranslationUnit[fRemoved.size()]);
+ return fRemoved.toArray(new ITranslationUnit[fRemoved.size()]);
}
- public List getAddedList() {
+ public List<ITranslationUnit> getAddedList() {
return fAdded;
}
- public List getChangedList() {
+ public List<ITranslationUnit> getChangedList() {
return fChanged;
}
}

Back to the top