mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-06 07:45:50 +02:00
Code formatting.
This commit is contained in:
parent
01d2201caa
commit
72e0dffa3d
3 changed files with 90 additions and 82 deletions
|
@ -165,7 +165,9 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
|
||||||
return (declSpec instanceof ICPPASTCompositeTypeSpecifier) ? PROCESS_CONTINUE : PROCESS_SKIP;
|
return (declSpec instanceof ICPPASTCompositeTypeSpecifier) ? PROCESS_CONTINUE : PROCESS_SKIP;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int visit( IASTDeclarator declarator ) { return PROCESS_SKIP; }
|
public int visit(IASTDeclarator declarator) {
|
||||||
|
return PROCESS_SKIP;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IASTName definition;
|
private IASTName definition;
|
||||||
|
@ -362,8 +364,6 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
|
||||||
return Linkage.CPP_LINKAGE;
|
return Linkage.CPP_LINKAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
public boolean isSameType(IType type) {
|
public boolean isSameType(IType type) {
|
||||||
if (type == this)
|
if (type == this)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.core.runtime.OperationCanceledException;
|
||||||
/**
|
/**
|
||||||
* Look up bindings in BTree objects and IPDOMNode objects. This additionally
|
* Look up bindings in BTree objects and IPDOMNode objects. This additionally
|
||||||
* takes into account function/method parameters as well as template
|
* takes into account function/method parameters as well as template
|
||||||
* specialization arguments for overloading, .
|
* specialization arguments for overloading.
|
||||||
*/
|
*/
|
||||||
public class CPPFindBinding extends FindBinding {
|
public class CPPFindBinding extends FindBinding {
|
||||||
|
|
||||||
|
@ -96,45 +96,51 @@ public class CPPFindBinding extends FindBinding {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PDOMBinding findBinding(BTree btree, final PDOM pdom, final char[]name, final int c2, final int ty2, int localToFileRec) throws CoreException {
|
public static PDOMBinding findBinding(BTree btree, final PDOM pdom, final char[] name,
|
||||||
|
final int c2, final int ty2, int localToFileRec) throws CoreException {
|
||||||
CPPFindBindingVisitor visitor= new CPPFindBindingVisitor(pdom, name, c2, ty2, localToFileRec);
|
CPPFindBindingVisitor visitor= new CPPFindBindingVisitor(pdom, name, c2, ty2, localToFileRec);
|
||||||
btree.accept(visitor);
|
btree.accept(visitor);
|
||||||
return visitor.getResult();
|
return visitor.getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static PDOMBinding findBinding(PDOMNode node, PDOM pdom, char[] name, int constant,
|
||||||
public static PDOMBinding findBinding(PDOMNode node, PDOM pdom, char[]name, int constant, int sigHash, int localToFileRec)
|
int sigHash, int localToFileRec) throws CoreException {
|
||||||
throws CoreException {
|
CPPFindBindingVisitor visitor= new CPPFindBindingVisitor(pdom, name, constant, sigHash,
|
||||||
CPPFindBindingVisitor visitor= new CPPFindBindingVisitor(pdom, name, constant, sigHash, localToFileRec);
|
localToFileRec);
|
||||||
try {
|
try {
|
||||||
node.accept(visitor);
|
node.accept(visitor);
|
||||||
} catch(OperationCanceledException ce) {
|
} catch (OperationCanceledException e) {
|
||||||
}
|
}
|
||||||
return visitor.getResult();
|
return visitor.getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static PDOMBinding findBinding(BTree btree, PDOMLinkage linkage, IBinding binding,
|
||||||
public static PDOMBinding findBinding(BTree btree, PDOMLinkage linkage, IBinding binding, int localToFileRec) throws CoreException {
|
int localToFileRec) throws CoreException {
|
||||||
Integer hash= 0;
|
Integer hash= 0;
|
||||||
try {
|
try {
|
||||||
hash = IndexCPPSignatureUtil.getSignatureHash(binding);
|
hash = IndexCPPSignatureUtil.getSignatureHash(binding);
|
||||||
} catch (DOMException e) {
|
} catch (DOMException e) {
|
||||||
}
|
}
|
||||||
if (hash != null) {
|
if (hash != null) {
|
||||||
return findBinding(btree, linkage.getPDOM(), binding.getNameCharArray(), linkage.getBindingType(binding), hash.intValue(), localToFileRec);
|
return findBinding(btree, linkage.getPDOM(), binding.getNameCharArray(),
|
||||||
|
linkage.getBindingType(binding), hash.intValue(), localToFileRec);
|
||||||
}
|
}
|
||||||
return findBinding(btree, linkage.getPDOM(), binding.getNameCharArray(), new int [] {linkage.getBindingType(binding)}, localToFileRec);
|
return findBinding(btree, linkage.getPDOM(), binding.getNameCharArray(),
|
||||||
|
new int[] {linkage.getBindingType(binding)}, localToFileRec);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PDOMBinding findBinding(PDOMNode node, PDOMLinkage linkage, IBinding binding, int localToFileRec) throws CoreException {
|
public static PDOMBinding findBinding(PDOMNode node, PDOMLinkage linkage, IBinding binding,
|
||||||
|
int localToFileRec) throws CoreException {
|
||||||
Integer hash = null;
|
Integer hash = null;
|
||||||
try {
|
try {
|
||||||
hash = IndexCPPSignatureUtil.getSignatureHash(binding);
|
hash = IndexCPPSignatureUtil.getSignatureHash(binding);
|
||||||
} catch (DOMException e) {
|
} catch (DOMException e) {
|
||||||
}
|
}
|
||||||
if (hash != null) {
|
if (hash != null) {
|
||||||
return findBinding(node, linkage.getPDOM(), binding.getNameCharArray(), linkage.getBindingType(binding), hash.intValue(), localToFileRec);
|
return findBinding(node, linkage.getPDOM(), binding.getNameCharArray(),
|
||||||
|
linkage.getBindingType(binding), hash.intValue(), localToFileRec);
|
||||||
}
|
}
|
||||||
return findBinding(node, linkage.getPDOM(), binding.getNameCharArray(), new int[] {linkage.getBindingType(binding)}, localToFileRec);
|
return findBinding(node, linkage.getPDOM(), binding.getNameCharArray(),
|
||||||
|
new int[] {linkage.getBindingType(binding)}, localToFileRec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -346,7 +346,9 @@ class PDOMCPPClassType extends PDOMCPPBinding implements IPDOMCPPClassType, IPDO
|
||||||
try {
|
try {
|
||||||
final List<IBinding> list = new ArrayList<IBinding>();
|
final List<IBinding> list = new ArrayList<IBinding>();
|
||||||
for (PDOMCPPFriend friend = getFirstFriend();
|
for (PDOMCPPFriend friend = getFirstFriend();
|
||||||
friend != null; friend = friend.getNextFriend()) list.add(0,friend.getFriendSpecifier());
|
friend != null; friend = friend.getNextFriend()) {
|
||||||
|
list.add(0, friend.getFriendSpecifier());
|
||||||
|
}
|
||||||
return list.toArray(new IBinding[list.size()]);
|
return list.toArray(new IBinding[list.size()]);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log(e);
|
||||||
|
|
Loading…
Add table
Reference in a new issue