Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java43
1 files changed, 25 insertions, 18 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
index a758c243216..a92eeabdd91 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
@@ -64,36 +64,43 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements
}
}
- public boolean accept( ASTVisitor action ){
- if( action.shouldVisitDeclSpecifiers ){
- switch( action.visit( this ) ){
- case ASTVisitor.PROCESS_ABORT : return false;
- case ASTVisitor.PROCESS_SKIP : return true;
- default : break;
+ public boolean accept(ASTVisitor action) {
+ if (action.shouldVisitDeclSpecifiers) {
+ switch (action.visit(this)) {
+ case ASTVisitor.PROCESS_ABORT:
+ return false;
+ case ASTVisitor.PROCESS_SKIP:
+ return true;
+ default:
+ break;
}
}
- if( name != null ) if( !name.accept( action ) ) return false;
+ if (name != null && !name.accept(action))
+ return false;
- if( action.shouldVisitDeclSpecifiers ){
- switch( action.leave( this ) ){
- case ASTVisitor.PROCESS_ABORT : return false;
- case ASTVisitor.PROCESS_SKIP : return true;
- default : break;
+ if (action.shouldVisitDeclSpecifiers ){
+ switch (action.leave(this)) {
+ case ASTVisitor.PROCESS_ABORT:
+ return false;
+ case ASTVisitor.PROCESS_SKIP:
+ return true;
+ default:
+ break;
}
}
return true;
}
public int getRoleForName(IASTName n) {
- if( n == name )
+ if (n == name)
return r_reference;
return r_unclear;
}
-
+
public IBinding[] findBindings(IASTName n, boolean isPrefix) {
IBinding[] bindings = CPPSemantics.findBindingsForContentAssist(n, isPrefix);
- List filtered = new ArrayList();
-
+ List<IBinding> filtered = new ArrayList<IBinding>();
+
for (int i = 0; i < bindings.length; i++) {
if (bindings[i] instanceof ICPPClassType
|| bindings[i] instanceof IEnumeration
@@ -103,7 +110,7 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements
filtered.add(bindings[i]);
}
}
-
- return (IBinding[]) filtered.toArray(new IBinding[filtered.size()]);
+
+ return filtered.toArray(new IBinding[filtered.size()]);
}
}

Back to the top