Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-21 08:25:27 +0000
committerMarkus Schorn2008-04-21 08:25:27 +0000
commitcb728b7643e917a92bdfd9719d981bbb058cffd8 (patch)
tree5714c86459c7f664e34c3f118ed3c4c78faeb0cf /core/org.eclipse.cdt.core
parenta3f5e0f30b5c87a60f24179fcbc84d86bb336db5 (diff)
downloadorg.eclipse.cdt-cb728b7643e917a92bdfd9719d981bbb058cffd8.tar.gz
org.eclipse.cdt-cb728b7643e917a92bdfd9719d981bbb058cffd8.tar.xz
org.eclipse.cdt-cb728b7643e917a92bdfd9719d981bbb058cffd8.zip
Improves method names.
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java24
1 files changed, 12 insertions, 12 deletions
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 2a82bbe0a0..c1027a163c 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
@@ -241,7 +241,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
if (binding == null)
return null;
- final PDOMNode parent= getAdaptedParent(binding, true);
+ final PDOMNode parent= adaptOrAddParent(true, binding);
if (parent == null)
return null;
@@ -601,7 +601,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
*/
@Override
public PDOMBinding doAdaptBinding(IBinding binding) throws CoreException {
- PDOMNode parent = getAdaptedParent(binding, false);
+ PDOMNode parent = adaptOrAddParent(false, binding);
if (parent == this) {
int localToFileRec= getLocalToFileRec(null, binding);
return CPPFindBinding.findBinding(getIndex(), this, binding, localToFileRec);
@@ -638,7 +638,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
* </ul>
* @throws CoreException
*/
- private final PDOMNode getAdaptedParent(IBinding binding, boolean addParent) throws CoreException {
+ private final PDOMNode adaptOrAddParent(boolean add, IBinding binding) throws CoreException {
try {
IBinding scopeBinding = null;
if (binding instanceof ICPPTemplateInstance) {
@@ -653,9 +653,9 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
}
if (scope == null) {
if (binding instanceof ICPPInternalUnknownClassType) {
- if (binding instanceof PDOMBinding)
- return addaptOrAddBinding(addParent, ((PDOMBinding) binding).getParentBinding());
-
+ if (binding instanceof PDOMBinding) {
+ return adaptOrAddBinding(add, ((PDOMBinding) binding).getParentBinding());
+ }
// what if we have a composite binding??
return null;
}
@@ -675,9 +675,9 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
if (scope instanceof IIndexScope) {
if (scope instanceof CompositeScope) { // we special case for performance
- return addaptOrAddBinding(addParent, ((CompositeScope) scope).getRawScopeBinding());
+ return adaptOrAddBinding(add, ((CompositeScope) scope).getRawScopeBinding());
}
- return addaptOrAddBinding(addParent, ((IIndexScope) scope).getScopeBinding());
+ return adaptOrAddBinding(add, ((IIndexScope) scope).getScopeBinding());
}
// the scope is from the ast
@@ -718,7 +718,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
}
}
if (scopeBinding != null && scopeBinding != binding) {
- return addaptOrAddBinding(addParent, scopeBinding);
+ return adaptOrAddBinding(add, scopeBinding);
}
} catch (DOMException e) {
throw new CoreException(Util.createStatus(e));
@@ -726,10 +726,10 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
return null;
}
- private PDOMBinding addaptOrAddBinding(boolean add, IBinding binding) throws CoreException {
- if (add)
+ private PDOMBinding adaptOrAddBinding(boolean add, IBinding binding) throws CoreException {
+ if (add) {
return addBinding(binding, null);
-
+ }
return adaptBinding(binding);
}

Back to the top