mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 10:45:37 +02:00
clean up warnings
This commit is contained in:
parent
d0325299ce
commit
1aa23a4f5d
46 changed files with 129 additions and 68 deletions
|
@ -122,9 +122,10 @@ public class DBProperties {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all properties, does not delete the record associated with the object itself - that is
|
* 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
|
* @throws CoreException
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public void clear() throws CoreException {
|
public void clear() throws CoreException {
|
||||||
index.accept(new IBTreeVisitor(){
|
index.accept(new IBTreeVisitor(){
|
||||||
public int compare(int record) throws CoreException {
|
public int compare(int record) throws CoreException {
|
||||||
|
|
|
@ -57,8 +57,8 @@ public final class MacroContainerCollector implements IBTreeVisitor {
|
||||||
final public int compare(int record) throws CoreException {
|
final public int compare(int record) throws CoreException {
|
||||||
if (monitor != null)
|
if (monitor != null)
|
||||||
checkCancelled();
|
checkCancelled();
|
||||||
IString name= PDOMNamedNode.getDBName(pdom, record);
|
IString rhsName= PDOMNamedNode.getDBName(pdom, record);
|
||||||
return compare(name);
|
return compare(rhsName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int compare(IString rhsName) throws CoreException {
|
private int compare(IString rhsName) throws CoreException {
|
||||||
|
|
|
@ -70,8 +70,8 @@ public class NamedNodeCollector implements IBTreeVisitor, IPDOMVisitor {
|
||||||
final public int compare(int record) throws CoreException {
|
final public int compare(int record) throws CoreException {
|
||||||
if (monitor != null)
|
if (monitor != null)
|
||||||
checkCancelled();
|
checkCancelled();
|
||||||
IString name= PDOMNamedNode.getDBName(linkage.getPDOM(), record);
|
IString rhsName= PDOMNamedNode.getDBName(linkage.getPDOM(), record);
|
||||||
return compare(name);
|
return compare(rhsName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int compare(IString rhsName) throws CoreException {
|
private int compare(IString rhsName) throws CoreException {
|
||||||
|
|
|
@ -546,7 +546,8 @@ public class PDOMFile implements IIndexFragmentFile {
|
||||||
}
|
}
|
||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public int compare(int record) throws CoreException {
|
public int compare(int record) throws CoreException {
|
||||||
IString name = db.getString(db.getInt(record + PDOMFile.LOCATION_REPRESENTATION));
|
IString name = db.getString(db.getInt(record + PDOMFile.LOCATION_REPRESENTATION));
|
||||||
int cmp= name.compare(rawKey, true);
|
int cmp= name.compare(rawKey, true);
|
||||||
|
@ -555,7 +556,8 @@ public class PDOMFile implements IIndexFragmentFile {
|
||||||
}
|
}
|
||||||
return cmp;
|
return cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public boolean visit(int record) throws CoreException {
|
public boolean visit(int record) throws CoreException {
|
||||||
if (linkageID >= 0) {
|
if (linkageID >= 0) {
|
||||||
this.record = record;
|
this.record = record;
|
||||||
|
|
|
@ -119,6 +119,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public void accept(final IPDOMVisitor visitor) throws CoreException {
|
public void accept(final IPDOMVisitor visitor) throws CoreException {
|
||||||
if (visitor instanceof IBTreeVisitor) {
|
if (visitor instanceof IBTreeVisitor) {
|
||||||
getIndex().accept((IBTreeVisitor) visitor);
|
getIndex().accept((IBTreeVisitor) visitor);
|
||||||
|
@ -150,6 +151,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
|
||||||
getIndex().insert(child.getRecord());
|
getIndex().insert(child.getRecord());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public PDOMNode getNode(int record) throws CoreException {
|
public PDOMNode getNode(int record) throws CoreException {
|
||||||
switch (PDOMNode.getNodeType(pdom, record)) {
|
switch (PDOMNode.getNodeType(pdom, record)) {
|
||||||
case POINTER_TYPE:
|
case POINTER_TYPE:
|
||||||
|
|
|
@ -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.ITypedef;
|
||||||
import org.eclipse.cdt.core.dom.ast.c.ICBasicType;
|
import org.eclipse.cdt.core.dom.ast.c.ICBasicType;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
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.index.IIndexType;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
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 TYPE_ID = PDOMNode.RECORD_SIZE + 0; // short
|
||||||
public static final int FLAGS = PDOMNode.RECORD_SIZE + 2; // 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 RECORD_SIZE = PDOMNode.RECORD_SIZE + 4;
|
||||||
|
|
||||||
public static final int IS_LONG = 0x1;
|
public static final int IS_LONG = 0x1;
|
||||||
|
@ -77,7 +79,7 @@ class PDOMCBasicType extends PDOMNode implements ICBasicType, IIndexType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCLinkage.CBASICTYPE;
|
return IIndexCBindingConstants.CBASICTYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getType() {
|
public int getType() {
|
||||||
|
|
|
@ -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.DOMException;
|
||||||
import org.eclipse.cdt.core.dom.ast.IEnumerator;
|
import org.eclipse.cdt.core.dom.ast.IEnumerator;
|
||||||
import org.eclipse.cdt.core.dom.ast.IType;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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 ENUMERATION = PDOMBinding.RECORD_SIZE + 0;
|
||||||
private static final int NEXT_ENUMERATOR = PDOMBinding.RECORD_SIZE + 4;
|
private static final int NEXT_ENUMERATOR = PDOMBinding.RECORD_SIZE + 4;
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 8;
|
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 8;
|
||||||
|
|
||||||
public PDOMCEnumerator(PDOM pdom, PDOMNode parent, IEnumerator enumerator, PDOMCEnumeration enumeration)
|
public PDOMCEnumerator(PDOM pdom, PDOMNode parent, IEnumerator enumerator, PDOMCEnumeration enumeration)
|
||||||
|
@ -47,7 +49,7 @@ class PDOMCEnumerator extends PDOMBinding implements IEnumerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCLinkage.CENUMERATOR;
|
return IIndexCBindingConstants.CENUMERATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PDOMCEnumerator getNextEnumerator() throws CoreException {
|
public PDOMCEnumerator getNextEnumerator() throws CoreException {
|
||||||
|
|
|
@ -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.IParameter;
|
||||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage;
|
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.
|
* The size in bytes of a PDOMCPPFunction record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 13;
|
public static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 13;
|
||||||
|
|
||||||
public PDOMCFunction(PDOM pdom, PDOMNode parent, IFunction function) throws CoreException {
|
public PDOMCFunction(PDOM pdom, PDOMNode parent, IFunction function) throws CoreException {
|
||||||
|
@ -148,7 +150,7 @@ class PDOMCFunction extends PDOMBinding implements IFunction {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCLinkage.CFUNCTION;
|
return IIndexCBindingConstants.CFUNCTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IFunctionType getType() {
|
public IFunctionType getType() {
|
||||||
|
|
|
@ -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.IProblemBinding;
|
||||||
import org.eclipse.cdt.core.dom.ast.IType;
|
import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
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.index.IIndexType;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
|
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.
|
* The size in bytes of a PDOMCFunctionType record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE= PDOMNode.RECORD_SIZE + 8;
|
protected static final int RECORD_SIZE= PDOMNode.RECORD_SIZE + 8;
|
||||||
|
|
||||||
public PDOMCFunctionType(PDOM pdom, int record) {
|
public PDOMCFunctionType(PDOM pdom, int record) {
|
||||||
|
@ -94,7 +96,7 @@ public class PDOMCFunctionType extends PDOMNode implements IIndexType, IFunction
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCLinkage.CFUNCTIONTYPE;
|
return IIndexCBindingConstants.CFUNCTIONTYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getRecordSize() {
|
protected int getRecordSize() {
|
||||||
|
@ -144,12 +146,12 @@ public class PDOMCFunctionType extends PDOMNode implements IIndexType, IFunction
|
||||||
|
|
||||||
|
|
||||||
public IType[] getParameterTypes() {
|
public IType[] getParameterTypes() {
|
||||||
final List result= new ArrayList();
|
final List<IType> result= new ArrayList<IType>();
|
||||||
try {
|
try {
|
||||||
PDOMNodeLinkedList list = new PDOMNodeLinkedList(pdom, record + TYPELIST, getLinkageImpl(), true);
|
PDOMNodeLinkedList list = new PDOMNodeLinkedList(pdom, record + TYPELIST, getLinkageImpl(), true);
|
||||||
list.accept(new IPDOMVisitor(){
|
list.accept(new IPDOMVisitor(){
|
||||||
public void leave(IPDOMNode node) throws CoreException {
|
public void leave(IPDOMNode node) throws CoreException {
|
||||||
result.add(node);
|
result.add((IType)node);
|
||||||
}
|
}
|
||||||
public boolean visit(IPDOMNode node) throws CoreException {
|
public boolean visit(IPDOMNode node) throws CoreException {
|
||||||
return false;
|
return false;
|
||||||
|
@ -158,7 +160,7 @@ public class PDOMCFunctionType extends PDOMNode implements IIndexType, IFunction
|
||||||
} catch(CoreException ce) {
|
} catch(CoreException ce) {
|
||||||
CCorePlugin.log(ce);
|
CCorePlugin.log(ce);
|
||||||
}
|
}
|
||||||
return (IType[]) result.toArray(new IType[result.size()]);
|
return result.toArray(new IType[result.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IType getReturnType() {
|
public IType getReturnType() {
|
||||||
|
|
|
@ -272,6 +272,7 @@ class PDOMCLinkage extends PDOMLinkage implements IIndexCBindingConstants {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public PDOMNode getNode(int record) throws CoreException {
|
public PDOMNode getNode(int record) throws CoreException {
|
||||||
if (record == 0)
|
if (record == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -36,6 +36,7 @@ class PDOMCTypedef extends PDOMBinding implements ITypedef, ITypeContainer, IInd
|
||||||
|
|
||||||
private static final int TYPE = PDOMBinding.RECORD_SIZE + 0;
|
private static final int TYPE = PDOMBinding.RECORD_SIZE + 0;
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 4;
|
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 4;
|
||||||
|
|
||||||
public PDOMCTypedef(PDOM pdom, PDOMNode parent, ITypedef typedef)
|
public PDOMCTypedef(PDOM pdom, PDOMNode parent, ITypedef typedef)
|
||||||
|
|
|
@ -49,6 +49,7 @@ class PDOMCVariable extends PDOMBinding implements IVariable {
|
||||||
/**
|
/**
|
||||||
* The size in bytes of a PDOMCVariable record in the database.
|
* The size in bytes of a PDOMCVariable record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 5;
|
protected static final int RECORD_SIZE = PDOMBinding.RECORD_SIZE + 5;
|
||||||
|
|
||||||
public PDOMCVariable(PDOM pdom, PDOMNode parent, IVariable variable) throws CoreException {
|
public PDOMCVariable(PDOM pdom, PDOMNode parent, IVariable variable) throws CoreException {
|
||||||
|
|
|
@ -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 TYPE_ID = PDOMNode.RECORD_SIZE + 0; // short
|
||||||
public static final int FLAGS = PDOMNode.RECORD_SIZE + 2; // 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 RECORD_SIZE = PDOMNode.RECORD_SIZE + 4;
|
||||||
|
|
||||||
protected short fFlags= -1;
|
protected short fFlags= -1;
|
||||||
|
|
|
@ -29,6 +29,10 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
* Mirrors type-hierarchy from DOM interfaces
|
* Mirrors type-hierarchy from DOM interfaces
|
||||||
*/
|
*/
|
||||||
abstract class PDOMCPPBinding extends PDOMBinding implements ICPPBinding {
|
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) {
|
public PDOMCPPBinding(PDOM pdom, int record) {
|
||||||
super(pdom, record);
|
super(pdom, record);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.core.parser.util.ObjectMap;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
import org.eclipse.cdt.internal.core.Util;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
|
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.index.IndexCPPSignatureUtil;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
|
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.
|
* The size in bytes of a PDOMCPPClassTemplatePartialSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPClassTemplate.RECORD_SIZE + 16;
|
protected static final int RECORD_SIZE = PDOMCPPClassTemplate.RECORD_SIZE + 16;
|
||||||
|
|
||||||
public PDOMCPPClassTemplatePartialSpecialization(PDOM pdom,
|
public PDOMCPPClassTemplatePartialSpecialization(PDOM pdom,
|
||||||
|
@ -82,7 +84,7 @@ class PDOMCPPClassTemplatePartialSpecialization extends
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_CLASS_TEMPLATE_PARTIAL_SPEC;
|
return IIndexCPPBindingConstants.CPP_CLASS_TEMPLATE_PARTIAL_SPEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PDOMCPPClassTemplatePartialSpecialization getNextPartial() throws CoreException {
|
public PDOMCPPClassTemplatePartialSpecialization getNextPartial() throws CoreException {
|
||||||
|
|
|
@ -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.CPPDeferredClassInstance;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalTemplateInstantiator;
|
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.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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
|
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
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.
|
* The size in bytes of a PDOMCPPClassTemplateSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPClassSpecialization.RECORD_SIZE + 8;
|
protected static final int RECORD_SIZE = PDOMCPPClassSpecialization.RECORD_SIZE + 8;
|
||||||
|
|
||||||
public PDOMCPPClassTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPClassTemplate template, PDOMBinding specialized)
|
public PDOMCPPClassTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPClassTemplate template, PDOMBinding specialized)
|
||||||
|
@ -63,7 +65,7 @@ class PDOMCPPClassTemplateSpecialization extends
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_CLASS_TEMPLATE_SPECIALIZATION;
|
return IIndexCPPBindingConstants.CPP_CLASS_TEMPLATE_SPECIALIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() throws DOMException {
|
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() throws DOMException {
|
||||||
|
|
|
@ -65,13 +65,12 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
class PDOMCPPClassType extends PDOMCPPBinding implements ICPPClassType,
|
class PDOMCPPClassType extends PDOMCPPBinding implements ICPPClassType,
|
||||||
ICPPClassScope, IPDOMMemberOwner, IIndexType, IIndexScope {
|
ICPPClassScope, IPDOMMemberOwner, IIndexType, IIndexScope {
|
||||||
|
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
private static final int FIRSTBASE = PDOMCPPBinding.RECORD_SIZE + 0;
|
private static final int FIRSTBASE = PDOMCPPBinding.RECORD_SIZE + 0;
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
private static final int KEY = PDOMCPPBinding.RECORD_SIZE + 4; // byte
|
private static final int KEY = PDOMCPPBinding.RECORD_SIZE + 4; // byte
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
private static final int MEMBERLIST = PDOMCPPBinding.RECORD_SIZE + 8;
|
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;
|
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 12;
|
||||||
|
|
||||||
public PDOMCPPClassType(PDOM pdom, PDOMNode parent, ICPPClassType classType)
|
public PDOMCPPClassType(PDOM pdom, PDOMNode parent, ICPPClassType classType)
|
||||||
|
|
|
@ -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.DOMException;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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.
|
* The size in bytes of a PDOMCPPConstructorInstance record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPMethodInstance.RECORD_SIZE + 0;
|
protected static final int RECORD_SIZE = PDOMCPPMethodInstance.RECORD_SIZE + 0;
|
||||||
|
|
||||||
public PDOMCPPConstructorInstance(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding instantiated)
|
public PDOMCPPConstructorInstance(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding instantiated)
|
||||||
|
@ -44,7 +46,7 @@ public class PDOMCPPConstructorInstance extends PDOMCPPMethodInstance implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_CONSTRUCTOR_INSTANCE;
|
return IIndexCPPBindingConstants.CPP_CONSTRUCTOR_INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isExplicit() throws DOMException {
|
public boolean isExplicit() throws DOMException {
|
||||||
|
|
|
@ -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.DOMException;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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.
|
* The size in bytes of a PDOMCPPConstructorSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPMethodSpecialization.RECORD_SIZE + 0;
|
protected static final int RECORD_SIZE = PDOMCPPMethodSpecialization.RECORD_SIZE + 0;
|
||||||
|
|
||||||
public PDOMCPPConstructorSpecialization(PDOM pdom, PDOMNode parent, ICPPConstructor constructor, PDOMBinding specialized) throws CoreException {
|
public PDOMCPPConstructorSpecialization(PDOM pdom, PDOMNode parent, ICPPConstructor constructor, PDOMBinding specialized) throws CoreException {
|
||||||
|
@ -42,7 +44,7 @@ class PDOMCPPConstructorSpecialization extends
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_CONSTRUCTOR_SPECIALIZATION;
|
return IIndexCPPBindingConstants.CPP_CONSTRUCTOR_SPECIALIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isExplicit() throws DOMException {
|
public boolean isExplicit() throws DOMException {
|
||||||
|
|
|
@ -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.DOMException;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -36,6 +37,6 @@ class PDOMCPPConstructorTemplate extends PDOMCPPMethodTemplate implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_CONSTRUCTOR_TEMPLATE;
|
return IIndexCPPBindingConstants.CPP_CONSTRUCTOR_TEMPLATE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.DOMException;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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.
|
* The size in bytes of a PDOMCPPConstructorTemplateSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPMethodTemplateSpecialization.RECORD_SIZE + 0;
|
protected static final int RECORD_SIZE = PDOMCPPMethodTemplateSpecialization.RECORD_SIZE + 0;
|
||||||
|
|
||||||
public PDOMCPPConstructorTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPConstructor constructor, PDOMBinding specialized)
|
public PDOMCPPConstructorTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPConstructor constructor, PDOMBinding specialized)
|
||||||
|
@ -43,7 +45,7 @@ class PDOMCPPConstructorTemplateSpecialization extends
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_CONSTRUCTOR_TEMPLATE_SPECIALIZATION;
|
return IIndexCPPBindingConstants.CPP_CONSTRUCTOR_TEMPLATE_SPECIALIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isExplicit() throws DOMException {
|
public boolean isExplicit() throws DOMException {
|
||||||
|
|
|
@ -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.ICPPInternalDeferredClassInstance;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalTemplateInstantiator;
|
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.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.index.IIndexType;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
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.PDOMBinding;
|
||||||
|
@ -43,6 +44,7 @@ class PDOMCPPDeferredClassInstance extends PDOMCPPInstance implements
|
||||||
/**
|
/**
|
||||||
* The size in bytes of a PDOMCPPDeferredClassInstance record in the database.
|
* The size in bytes of a PDOMCPPDeferredClassInstance record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPInstance.RECORD_SIZE + 0;
|
protected static final int RECORD_SIZE = PDOMCPPInstance.RECORD_SIZE + 0;
|
||||||
|
|
||||||
public PDOMCPPDeferredClassInstance(PDOM pdom, PDOMNode parent, ICPPClassType classType, PDOMBinding instantiated)
|
public PDOMCPPDeferredClassInstance(PDOM pdom, PDOMNode parent, ICPPClassType classType, PDOMBinding instantiated)
|
||||||
|
@ -59,7 +61,7 @@ class PDOMCPPDeferredClassInstance extends PDOMCPPInstance implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_DEFERRED_CLASS_INSTANCE;
|
return IIndexCPPBindingConstants.CPP_DEFERRED_CLASS_INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICPPBase[] getBases() throws DOMException {
|
public ICPPBase[] getBases() throws DOMException {
|
||||||
|
|
|
@ -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.ICPPDeferredTemplateInstance;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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.
|
* The size in bytes of a PDOMCPPDeferredFunctionInstance record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPFunctionInstance.RECORD_SIZE + 0;
|
protected static final int RECORD_SIZE = PDOMCPPFunctionInstance.RECORD_SIZE + 0;
|
||||||
|
|
||||||
public PDOMCPPDeferredFunctionInstance(PDOM pdom, PDOMNode parent, ICPPFunction function, PDOMBinding instantiated)
|
public PDOMCPPDeferredFunctionInstance(PDOM pdom, PDOMNode parent, ICPPFunction function, PDOMBinding instantiated)
|
||||||
|
@ -43,6 +45,6 @@ class PDOMCPPDeferredFunctionInstance extends PDOMCPPFunctionInstance
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_DEFERRED_FUNCTION_INSTANCE;
|
return IIndexCPPBindingConstants.CPP_DEFERRED_FUNCTION_INSTANCE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.ICPPField;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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.
|
* The size in bytes of a PDOMCPPFieldSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
|
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
|
||||||
|
|
||||||
public PDOMCPPFieldSpecialization(PDOM pdom, PDOMNode parent,
|
public PDOMCPPFieldSpecialization(PDOM pdom, PDOMNode parent,
|
||||||
|
@ -63,7 +65,7 @@ class PDOMCPPFieldSpecialization extends PDOMCPPSpecialization implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_FIELD_SPECIALIZATION;
|
return IIndexCPPBindingConstants.CPP_FIELD_SPECIALIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ICPPField getField() {
|
private ICPPField getField() {
|
||||||
|
|
|
@ -47,40 +47,35 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
||||||
* Offset of total number of function parameters (relative to the
|
* Offset of total number of function parameters (relative to the
|
||||||
* beginning of the record).
|
* beginning of the record).
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
private static final int NUM_PARAMS = PDOMCPPBinding.RECORD_SIZE + 0;
|
private static final int NUM_PARAMS = PDOMCPPBinding.RECORD_SIZE + 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Offset of pointer to the first parameter of this function (relative to
|
* Offset of pointer to the first parameter of this function (relative to
|
||||||
* the beginning of the record).
|
* the beginning of the record).
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
private static final int FIRST_PARAM = PDOMCPPBinding.RECORD_SIZE + 4;
|
private static final int FIRST_PARAM = PDOMCPPBinding.RECORD_SIZE + 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Offset of pointer to the function type record of this function (relative to
|
* Offset of pointer to the function type record of this function (relative to
|
||||||
* the beginning of the record).
|
* the beginning of the record).
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
protected static final int FUNCTION_TYPE= PDOMCPPBinding.RECORD_SIZE + 8;
|
protected static final int FUNCTION_TYPE= PDOMCPPBinding.RECORD_SIZE + 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Offset of hash of parameter information to allow fast comparison
|
* Offset of hash of parameter information to allow fast comparison
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
private static final int SIGNATURE_MEMENTO = PDOMCPPBinding.RECORD_SIZE + 12;
|
private static final int SIGNATURE_MEMENTO = PDOMCPPBinding.RECORD_SIZE + 12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Offset of annotation information (relative to the beginning of the
|
* Offset of annotation information (relative to the beginning of the
|
||||||
* record).
|
* record).
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
protected static final int ANNOTATION = PDOMCPPBinding.RECORD_SIZE + 16; // byte
|
protected static final int ANNOTATION = PDOMCPPBinding.RECORD_SIZE + 16; // byte
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The size in bytes of a PDOMCPPFunction record in the database.
|
* 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;
|
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 17;
|
||||||
|
|
||||||
public PDOMCPPFunction(PDOM pdom, PDOMNode parent, ICPPFunction function, boolean setTypes) throws CoreException {
|
public PDOMCPPFunction(PDOM pdom, PDOMNode parent, ICPPFunction function, boolean setTypes) throws CoreException {
|
||||||
|
|
|
@ -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.ICPPSpecialization;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
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.
|
* The size in bytes of a PDOMCPPFunctionInstance record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPInstance.RECORD_SIZE + 12;
|
protected static final int RECORD_SIZE = PDOMCPPInstance.RECORD_SIZE + 12;
|
||||||
|
|
||||||
public PDOMCPPFunctionInstance(PDOM pdom, PDOMNode parent, ICPPFunction function, PDOMBinding instantiated)
|
public PDOMCPPFunctionInstance(PDOM pdom, PDOMNode parent, ICPPFunction function, PDOMBinding instantiated)
|
||||||
|
@ -100,7 +102,7 @@ class PDOMCPPFunctionInstance extends PDOMCPPInstance implements ICPPFunction {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_FUNCTION_INSTANCE;
|
return IIndexCPPBindingConstants.CPP_FUNCTION_INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PDOMCPPParameterSpecialization getFirstParameter() throws CoreException {
|
public PDOMCPPParameterSpecialization getFirstParameter() throws CoreException {
|
||||||
|
|
|
@ -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.CPPDeferredFunctionInstance;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalTemplateInstantiator;
|
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.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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
|
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.IPDOMMemberOwner;
|
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.
|
* The size in bytes of a PDOMCPPFunctionTemplateSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPFunctionSpecialization.RECORD_SIZE + 8;
|
protected static final int RECORD_SIZE = PDOMCPPFunctionSpecialization.RECORD_SIZE + 8;
|
||||||
|
|
||||||
public PDOMCPPFunctionTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPFunctionTemplate template, PDOMBinding specialized)
|
public PDOMCPPFunctionTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPFunctionTemplate template, PDOMBinding specialized)
|
||||||
|
@ -62,7 +64,7 @@ class PDOMCPPFunctionTemplateSpecialization extends
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_FUNCTION_TEMPLATE_SPECIALIZATION;
|
return IIndexCPPBindingConstants.CPP_FUNCTION_TEMPLATE_SPECIALIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICPPTemplateParameter[] getTemplateParameters() throws DOMException {
|
public ICPPTemplateParameter[] getTemplateParameters() throws DOMException {
|
||||||
|
|
|
@ -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.ASTTypeUtil;
|
||||||
import org.eclipse.cdt.core.dom.ast.IType;
|
import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.c.PDOMCAnnotation;
|
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.
|
* The size in bytes of a PDOMCFunctionType record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
private static final int RECORD_SIZE= PDOMCFunctionType.RECORD_SIZE+ 4;
|
private static final int RECORD_SIZE= PDOMCFunctionType.RECORD_SIZE+ 4;
|
||||||
|
|
||||||
protected PDOMCPPFunctionType(PDOM pdom, int offset) {
|
protected PDOMCPPFunctionType(PDOM pdom, int offset) {
|
||||||
|
@ -67,7 +69,7 @@ public class PDOMCPPFunctionType extends PDOMCFunctionType implements ICPPFuncti
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_FUNCTION_TYPE;
|
return IIndexCPPBindingConstants.CPP_FUNCTION_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
|
@ -37,6 +37,7 @@ abstract class PDOMCPPInstance extends PDOMCPPSpecialization implements
|
||||||
/**
|
/**
|
||||||
* The size in bytes of a PDOMCPPInstance record in the database.
|
* The size in bytes of a PDOMCPPInstance record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
|
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
|
||||||
|
|
||||||
public PDOMCPPInstance(PDOM pdom, PDOMNode parent, ICPPTemplateInstance inst, PDOMBinding instantiated)
|
public PDOMCPPInstance(PDOM pdom, PDOMNode parent, ICPPTemplateInstance inst, PDOMBinding instantiated)
|
||||||
|
|
|
@ -744,6 +744,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public PDOMNode getNode(int record) throws CoreException {
|
public PDOMNode getNode(int record) throws CoreException {
|
||||||
if (record == 0)
|
if (record == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -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.DOMException;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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.
|
* The size in bytes of a PDOMCPPMethodInstance record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPFunctionInstance.RECORD_SIZE + 0;
|
protected static final int RECORD_SIZE = PDOMCPPFunctionInstance.RECORD_SIZE + 0;
|
||||||
|
|
||||||
public PDOMCPPMethodInstance(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding instantiated)
|
public PDOMCPPMethodInstance(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding instantiated)
|
||||||
|
@ -45,7 +47,7 @@ class PDOMCPPMethodInstance extends PDOMCPPFunctionInstance implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_METHOD_INSTANCE;
|
return IIndexCPPBindingConstants.CPP_METHOD_INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDestructor() throws DOMException {
|
public boolean isDestructor() throws DOMException {
|
||||||
|
|
|
@ -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.ICPPFunctionType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
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.
|
* The size in bytes of a PDOMCPPMethodSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPFunctionSpecialization.RECORD_SIZE + 1;
|
protected static final int RECORD_SIZE = PDOMCPPFunctionSpecialization.RECORD_SIZE + 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,7 +72,7 @@ class PDOMCPPMethodSpecialization extends PDOMCPPFunctionSpecialization
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_METHOD_SPECIALIZATION;
|
return IIndexCPPBindingConstants.CPP_METHOD_SPECIALIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDestructor() throws DOMException {
|
public boolean isDestructor() throws DOMException {
|
||||||
|
|
|
@ -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.ICPPFunctionType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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.
|
* The size in bytes of a PDOMCPPMethodTemplate record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPFunctionTemplate.RECORD_SIZE + 1;
|
protected static final int RECORD_SIZE = PDOMCPPFunctionTemplate.RECORD_SIZE + 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,7 +75,7 @@ class PDOMCPPMethodTemplate extends PDOMCPPFunctionTemplate implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_METHOD_TEMPLATE;
|
return IIndexCPPBindingConstants.CPP_METHOD_TEMPLATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDestructor() throws DOMException {
|
public boolean isDestructor() throws DOMException {
|
||||||
|
|
|
@ -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.ICPPClassType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
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.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
|
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.
|
* The size in bytes of a PDOMCPPMethodTemplateSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPFunctionTemplateSpecialization.RECORD_SIZE + 0;
|
protected static final int RECORD_SIZE = PDOMCPPFunctionTemplateSpecialization.RECORD_SIZE + 0;
|
||||||
|
|
||||||
public PDOMCPPMethodTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding specialized)
|
public PDOMCPPMethodTemplateSpecialization(PDOM pdom, PDOMNode parent, ICPPMethod method, PDOMBinding specialized)
|
||||||
|
@ -47,7 +49,7 @@ class PDOMCPPMethodTemplateSpecialization extends
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_METHOD_TEMPLATE_SPECIALIZATION;
|
return IIndexCPPBindingConstants.CPP_METHOD_TEMPLATE_SPECIALIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDestructor() throws DOMException {
|
public boolean isDestructor() throws DOMException {
|
||||||
|
|
|
@ -74,6 +74,7 @@ class PDOMCPPNamespace extends PDOMCPPBinding
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public void accept(final IPDOMVisitor visitor) throws CoreException {
|
public void accept(final IPDOMVisitor visitor) throws CoreException {
|
||||||
if (visitor instanceof IBTreeVisitor) {
|
if (visitor instanceof IBTreeVisitor) {
|
||||||
getIndex().accept((IBTreeVisitor) visitor);
|
getIndex().accept((IBTreeVisitor) visitor);
|
||||||
|
@ -176,6 +177,7 @@ class PDOMCPPNamespace extends PDOMCPPBinding
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public IBinding[] getMemberBindings() throws DOMException {
|
public IBinding[] getMemberBindings() throws DOMException {
|
||||||
IBinding[] result = null;
|
IBinding[] result = null;
|
||||||
final List<PDOMNode> preresult = new ArrayList<PDOMNode>();
|
final List<PDOMNode> preresult = new ArrayList<PDOMNode>();
|
||||||
|
|
|
@ -31,9 +31,8 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
*/
|
*/
|
||||||
class PDOMCPPNamespaceAlias extends PDOMCPPBinding implements ICPPNamespaceAlias {
|
class PDOMCPPNamespaceAlias extends PDOMCPPBinding implements ICPPNamespaceAlias {
|
||||||
|
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
private static final int NAMESPACE_BINDING = PDOMCPPBinding.RECORD_SIZE + 0;
|
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;
|
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 4;
|
||||||
|
|
||||||
public PDOMCPPNamespaceAlias(PDOM pdom, PDOMNode parent, ICPPNamespaceAlias alias)
|
public PDOMCPPNamespaceAlias(PDOM pdom, PDOMNode parent, ICPPNamespaceAlias alias)
|
||||||
|
|
|
@ -43,6 +43,7 @@ class PDOMCPPParameterSpecialization extends PDOMCPPSpecialization implements IC
|
||||||
/**
|
/**
|
||||||
* The size in bytes of a PDOMCPPParameterSpecialization record in the database.
|
* The size in bytes of a PDOMCPPParameterSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 8;
|
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 8;
|
||||||
|
|
||||||
public PDOMCPPParameterSpecialization(PDOM pdom, PDOMNode parent, ICPPParameter param, PDOMCPPParameter specialized, int typeRecord)
|
public PDOMCPPParameterSpecialization(PDOM pdom, PDOMNode parent, ICPPParameter param, PDOMCPPParameter specialized, int typeRecord)
|
||||||
|
|
|
@ -15,6 +15,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType;
|
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.IIndexType;
|
||||||
import org.eclipse.cdt.internal.core.index.PointerTypeClone;
|
import org.eclipse.cdt.internal.core.index.PointerTypeClone;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||||
|
@ -28,6 +29,7 @@ class PDOMCPPPointerToMemberType extends PDOMPointerType
|
||||||
implements ICPPPointerToMemberType, IIndexType {
|
implements ICPPPointerToMemberType, IIndexType {
|
||||||
|
|
||||||
private static final int TYPE = PDOMPointerType.RECORD_SIZE;
|
private static final int TYPE = PDOMPointerType.RECORD_SIZE;
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
private static final int RECORD_SIZE= TYPE+4;
|
private static final int RECORD_SIZE= TYPE+4;
|
||||||
|
|
||||||
public PDOMCPPPointerToMemberType(PDOM pdom, int record) {
|
public PDOMCPPPointerToMemberType(PDOM pdom, int record) {
|
||||||
|
@ -54,7 +56,7 @@ implements ICPPPointerToMemberType, IIndexType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_POINTER_TO_MEMBER_TYPE;
|
return IIndexCPPBindingConstants.CPP_POINTER_TO_MEMBER_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICPPClassType getMemberOfClass() {
|
public ICPPClassType getMemberOfClass() {
|
||||||
|
|
|
@ -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.Util;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
||||||
import org.eclipse.cdt.internal.core.index.CPPReferenceTypeClone;
|
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.index.IIndexType;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
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;
|
private static final int TYPE = PDOMNode.RECORD_SIZE + 0;
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMNode.RECORD_SIZE + 4;
|
protected static final int RECORD_SIZE = PDOMNode.RECORD_SIZE + 4;
|
||||||
|
|
||||||
public PDOMCPPReferenceType(PDOM pdom, int record) {
|
public PDOMCPPReferenceType(PDOM pdom, int record) {
|
||||||
|
@ -65,7 +67,7 @@ class PDOMCPPReferenceType extends PDOMNode implements ICPPReferenceType,
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_REFERENCE_TYPE;
|
return IIndexCPPBindingConstants.CPP_REFERENCE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ abstract class PDOMCPPSpecialization extends PDOMCPPBinding implements
|
||||||
/**
|
/**
|
||||||
* The size in bytes of a PDOMCPPSpecialization record in the database.
|
* The size in bytes of a PDOMCPPSpecialization record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 16;
|
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 16;
|
||||||
|
|
||||||
public PDOMCPPSpecialization(PDOM pdom, PDOMNode parent, ICPPSpecialization spec, PDOMNamedNode specialized)
|
public PDOMCPPSpecialization(PDOM pdom, PDOMNode parent, ICPPSpecialization spec, PDOMNamedNode specialized)
|
||||||
|
|
|
@ -38,6 +38,7 @@ class PDOMCPPTemplateTypeParameter extends PDOMCPPBinding implements
|
||||||
/**
|
/**
|
||||||
* The size in bytes of a PDOMCPPTemplateTypeParameter record in the database.
|
* The size in bytes of a PDOMCPPTemplateTypeParameter record in the database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 4;
|
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 4;
|
||||||
|
|
||||||
public PDOMCPPTemplateTypeParameter(PDOM pdom, PDOMNode parent,
|
public PDOMCPPTemplateTypeParameter(PDOM pdom, PDOMNode parent,
|
||||||
|
|
|
@ -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.Util;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
||||||
import org.eclipse.cdt.internal.core.index.CPPTypedefClone;
|
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.index.IIndexType;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
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.PDOMBinding;
|
||||||
|
@ -35,6 +36,7 @@ class PDOMCPPTypedefSpecialization extends PDOMCPPSpecialization
|
||||||
|
|
||||||
private static final int TYPE = PDOMCPPSpecialization.RECORD_SIZE + 0;
|
private static final int TYPE = PDOMCPPSpecialization.RECORD_SIZE + 0;
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
|
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 4;
|
||||||
|
|
||||||
public PDOMCPPTypedefSpecialization(PDOM pdom, PDOMNode parent, ITypedef typedef, PDOMBinding specialized)
|
public PDOMCPPTypedefSpecialization(PDOM pdom, PDOMNode parent, ITypedef typedef, PDOMBinding specialized)
|
||||||
|
@ -60,7 +62,7 @@ class PDOMCPPTypedefSpecialization extends PDOMCPPSpecialization
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNodeType() {
|
public int getNodeType() {
|
||||||
return PDOMCPPLinkage.CPP_TYPEDEF_SPECIALIZATION;
|
return IIndexCPPBindingConstants.CPP_TYPEDEF_SPECIALIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IType getType() throws DOMException {
|
public IType getType() throws DOMException {
|
||||||
|
|
|
@ -29,16 +29,19 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
* @see ICPPUsingDeclaration
|
* @see ICPPUsingDeclaration
|
||||||
*/
|
*/
|
||||||
class PDOMCPPUsingDeclaration extends PDOMCPPBinding implements ICPPUsingDeclaration {
|
class PDOMCPPUsingDeclaration extends PDOMCPPBinding implements ICPPUsingDeclaration {
|
||||||
@SuppressWarnings("static-access")
|
|
||||||
private static final int TARGET_BINDING = PDOMCPPBinding.RECORD_SIZE + 0;
|
private static final int TARGET_BINDING = PDOMCPPBinding.RECORD_SIZE + 0;
|
||||||
// Using declarations for functions may have multiple delegates. We model such case
|
// Using declarations for functions may have multiple delegates. We model such case
|
||||||
// by creating a chain of PDOMCPPUsingDeclaration objects linked by NEXT_DELEGATE field.
|
// 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;
|
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;
|
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 8;
|
||||||
|
|
||||||
private IBinding[] delegates;
|
private IBinding[] delegates;
|
||||||
|
|
||||||
|
@SuppressWarnings("hiding")
|
||||||
public PDOMCPPUsingDeclaration(PDOM pdom, PDOMNode parent, ICPPUsingDeclaration using)
|
public PDOMCPPUsingDeclaration(PDOM pdom, PDOMNode parent, ICPPUsingDeclaration using)
|
||||||
throws CoreException {
|
throws CoreException {
|
||||||
super(pdom, parent, using.getNameCharArray());
|
super(pdom, parent, using.getNameCharArray());
|
||||||
|
|
|
@ -28,12 +28,12 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
*/
|
*/
|
||||||
class PDOMClassUtil {
|
class PDOMClassUtil {
|
||||||
static class FieldCollector implements IPDOMVisitor {
|
static class FieldCollector implements IPDOMVisitor {
|
||||||
private List fields = new ArrayList();
|
private List<ICPPField> fields = new ArrayList<ICPPField>();
|
||||||
public boolean visit(IPDOMNode node) throws CoreException {
|
public boolean visit(IPDOMNode node) throws CoreException {
|
||||||
if (node instanceof ICPPField) {
|
if (node instanceof ICPPField) {
|
||||||
ICPPField field= (ICPPField) node;
|
ICPPField field= (ICPPField) node;
|
||||||
if (IndexFilter.ALL_DECLARED_OR_IMPLICIT.acceptBinding(field)) {
|
if (IndexFilter.ALL_DECLARED_OR_IMPLICIT.acceptBinding(field)) {
|
||||||
fields.add(node);
|
fields.add(field);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -41,12 +41,12 @@ class PDOMClassUtil {
|
||||||
public void leave(IPDOMNode node) throws CoreException {
|
public void leave(IPDOMNode node) throws CoreException {
|
||||||
}
|
}
|
||||||
public ICPPField[] getFields() {
|
public ICPPField[] getFields() {
|
||||||
return (ICPPField[])fields.toArray(new ICPPField[fields.size()]);
|
return fields.toArray(new ICPPField[fields.size()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class ConstructorCollector implements IPDOMVisitor {
|
static class ConstructorCollector implements IPDOMVisitor {
|
||||||
private List fConstructors = new ArrayList();
|
private List<ICPPConstructor> fConstructors = new ArrayList<ICPPConstructor>();
|
||||||
public boolean visit(IPDOMNode node) throws CoreException {
|
public boolean visit(IPDOMNode node) throws CoreException {
|
||||||
if (node instanceof ICPPConstructor) {
|
if (node instanceof ICPPConstructor) {
|
||||||
ICPPConstructor cons= (ICPPConstructor) node;
|
ICPPConstructor cons= (ICPPConstructor) node;
|
||||||
|
@ -59,19 +59,19 @@ class PDOMClassUtil {
|
||||||
public void leave(IPDOMNode node) throws CoreException {
|
public void leave(IPDOMNode node) throws CoreException {
|
||||||
}
|
}
|
||||||
public ICPPConstructor[] getConstructors() {
|
public ICPPConstructor[] getConstructors() {
|
||||||
return (ICPPConstructor[])fConstructors.toArray(new ICPPConstructor[fConstructors.size()]);
|
return fConstructors.toArray(new ICPPConstructor[fConstructors.size()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class MethodCollector implements IPDOMVisitor {
|
static class MethodCollector implements IPDOMVisitor {
|
||||||
private final List methods;
|
private final List<ICPPMethod> methods;
|
||||||
private final boolean acceptNonImplicit;
|
private final boolean acceptNonImplicit;
|
||||||
private final IndexFilter filter;
|
private final IndexFilter filter;
|
||||||
public MethodCollector(boolean acceptImplicit) {
|
public MethodCollector(boolean acceptImplicit) {
|
||||||
this(acceptImplicit, true);
|
this(acceptImplicit, true);
|
||||||
}
|
}
|
||||||
public MethodCollector(boolean acceptImplicit, boolean acceptNonImplicit) {
|
public MethodCollector(boolean acceptImplicit, boolean acceptNonImplicit) {
|
||||||
this.methods = new ArrayList();
|
this.methods = new ArrayList<ICPPMethod>();
|
||||||
this.acceptNonImplicit= acceptNonImplicit;
|
this.acceptNonImplicit= acceptNonImplicit;
|
||||||
this.filter= acceptImplicit ? IndexFilter.ALL_DECLARED_OR_IMPLICIT : IndexFilter.ALL_DECLARED;
|
this.filter= acceptImplicit ? IndexFilter.ALL_DECLARED_OR_IMPLICIT : IndexFilter.ALL_DECLARED;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ class PDOMClassUtil {
|
||||||
ICPPMethod method= (ICPPMethod) node;
|
ICPPMethod method= (ICPPMethod) node;
|
||||||
if (filter.acceptBinding(method)) {
|
if (filter.acceptBinding(method)) {
|
||||||
if (acceptNonImplicit || method.isImplicit()) {
|
if (acceptNonImplicit || method.isImplicit()) {
|
||||||
methods.add(node);
|
methods.add(method);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ class PDOMClassUtil {
|
||||||
public void leave(IPDOMNode node) throws CoreException {
|
public void leave(IPDOMNode node) throws CoreException {
|
||||||
}
|
}
|
||||||
public ICPPMethod[] getMethods() {
|
public ICPPMethod[] getMethods() {
|
||||||
return (ICPPMethod[])methods.toArray(new ICPPMethod[methods.size()]);
|
return methods.toArray(new ICPPMethod[methods.size()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,9 +224,9 @@ public class GeneratePDOMApplication implements IApplication {
|
||||||
public void worked(int work) {
|
public void worked(int work) {
|
||||||
internalWorked(work);
|
internalWorked(work);
|
||||||
}
|
}
|
||||||
public void beginTask(String name, int totalWork) {
|
public void beginTask(String name, int total) {
|
||||||
this.taskName = name;
|
this.taskName = name;
|
||||||
this.totalWork = totalWork;
|
this.totalWork = total;
|
||||||
}
|
}
|
||||||
public void internalWorked(double work) {
|
public void internalWorked(double work) {
|
||||||
synchronized(mutex) {
|
synchronized(mutex) {
|
||||||
|
|
|
@ -23,9 +23,9 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
|
|
||||||
public class DeltaAnalyzer {
|
public class DeltaAnalyzer {
|
||||||
private List fAdded= new ArrayList();
|
private List<ITranslationUnit> fAdded= new ArrayList<ITranslationUnit>();
|
||||||
private List fChanged= new ArrayList();
|
private List<ITranslationUnit> fChanged= new ArrayList<ITranslationUnit>();
|
||||||
private List fRemoved= new ArrayList();
|
private List<ITranslationUnit> fRemoved= new ArrayList<ITranslationUnit>();
|
||||||
|
|
||||||
public DeltaAnalyzer() {
|
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()));
|
container.accept(new TranslationUnitCollector(sources, sources, new NullProgressMonitor()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITranslationUnit[] getAddedTUs() {
|
public ITranslationUnit[] getAddedTUs() {
|
||||||
return (ITranslationUnit[]) fAdded.toArray(new ITranslationUnit[fAdded.size()]);
|
return fAdded.toArray(new ITranslationUnit[fAdded.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITranslationUnit[] getChangedTUs() {
|
public ITranslationUnit[] getChangedTUs() {
|
||||||
return (ITranslationUnit[]) fChanged.toArray(new ITranslationUnit[fChanged.size()]);
|
return fChanged.toArray(new ITranslationUnit[fChanged.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITranslationUnit[] getRemovedTUs() {
|
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;
|
return fAdded;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List getChangedList() {
|
public List<ITranslationUnit> getChangedList() {
|
||||||
return fChanged;
|
return fChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue