1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Cosmetics.

Change-Id: If6660920227beedfa8d2c39c3e24cf1bd6454d5e
This commit is contained in:
Sergey Prigogin 2016-03-11 15:46:31 -05:00
parent 4a9287acb5
commit 9240257992
3 changed files with 7 additions and 11 deletions

View file

@ -308,7 +308,7 @@ public abstract class ASTVisitor {
return PROCESS_CONTINUE;
}
public int visit( IASTProblem problem ){
public int visit(IASTProblem problem) {
return PROCESS_CONTINUE;
}

View file

@ -45,7 +45,7 @@ public interface IBinding extends IAdaptable {
public ILinkage getLinkage();
/**
* Returns the binding that owns this binding, or <code>null</code> if there is no owner.
* Returns the binding that owns this binding, or {@code null} if there is no owner.
* <p>
* The owner is determined as follows:
* <br> {@link ICPPUsingDeclaration}: The owner depends on where the declaration is found,

View file

@ -40,14 +40,14 @@ public class ASTHelper {
private ASTHelper() {
}
static public IASTNode getDeclarationForNode(IASTNode node) {
public static IASTNode getDeclarationForNode(IASTNode node) {
while (node != null && !(node instanceof IASTSimpleDeclaration) && !(node instanceof IASTParameterDeclaration)) {
node = node.getParent();
}
return node;
}
static public IASTDeclarator getDeclaratorForNode(IASTNode node) {
public static IASTDeclarator getDeclaratorForNode(IASTNode node) {
IASTNode tmpNode = getDeclarationForNode(node);
IASTDeclarator declarator = null;
@ -63,7 +63,7 @@ public class ASTHelper {
return declarator;
}
static public IASTDeclSpecifier getDeclarationSpecifier(IASTNode declaration) {
public static IASTDeclSpecifier getDeclarationSpecifier(IASTNode declaration) {
if (declaration != null) {
if (declaration instanceof IASTSimpleDeclaration) {
IASTSimpleDeclaration simpleDecl = (IASTSimpleDeclaration) declaration;
@ -122,9 +122,7 @@ public class ASTHelper {
IASTTranslationUnit unit, String aktFileName) {
Collection<IASTPreprocessorStatement> statements = new ArrayList<IASTPreprocessorStatement>();
for (IASTPreprocessorStatement aktStatement : unit.getAllPreprocessorStatements()) {
if (aktStatement.getFileLocation() == null) {
continue;
} else if (aktStatement.getFileLocation().getFileName().equals(aktFileName)) {
if (aktStatement.getFileLocation() != null && aktStatement.getFileLocation().getFileName().equals(aktFileName)) {
statements.add(aktStatement);
}
}
@ -134,9 +132,7 @@ public class ASTHelper {
public static Collection<IASTDeclaration> getAllInFileDeclarations(IASTTranslationUnit unit, String aktFileName) {
Collection<IASTDeclaration> decls = new ArrayList<IASTDeclaration>();
for (IASTDeclaration aktDecl: unit.getDeclarations()) {
if (aktDecl.getFileLocation() == null) {
continue;
} else if (aktDecl.getFileLocation().getFileName().equals(aktFileName)) {
if (aktDecl.getFileLocation() != null && aktDecl.getFileLocation().getFileName().equals(aktFileName)) {
decls.add(aktDecl);
}
}