mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Cosmetics.
This commit is contained in:
parent
75a36f0c5e
commit
cc0d1ce4aa
1 changed files with 8 additions and 8 deletions
|
@ -54,7 +54,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat
|
||||||
|
|
||||||
private IASTDeclaration[] fAllDeclarations = null;
|
private IASTDeclaration[] fAllDeclarations = null;
|
||||||
private IASTDeclaration[] fActiveDeclarations= null;
|
private IASTDeclaration[] fActiveDeclarations= null;
|
||||||
private int fLastDeclaration=-1;
|
private int fLastDeclaration= -1;
|
||||||
|
|
||||||
protected ILocationResolver fLocationResolver;
|
protected ILocationResolver fLocationResolver;
|
||||||
private IIndex fIndex;
|
private IIndex fIndex;
|
||||||
|
@ -72,7 +72,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat
|
||||||
if (d != null) {
|
if (d != null) {
|
||||||
d.setParent(this);
|
d.setParent(this);
|
||||||
d.setPropertyInParent(OWNED_DECLARATION);
|
d.setPropertyInParent(OWNED_DECLARATION);
|
||||||
fAllDeclarations = (IASTDeclaration[]) ArrayUtil.append( IASTDeclaration.class, fAllDeclarations, ++fLastDeclaration, d);
|
fAllDeclarations = (IASTDeclaration[]) ArrayUtil.append(IASTDeclaration.class, fAllDeclarations, ++fLastDeclaration, d);
|
||||||
fActiveDeclarations= null;
|
fActiveDeclarations= null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -253,12 +253,12 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean accept( ASTVisitor action ){
|
public final boolean accept(ASTVisitor action) {
|
||||||
if (action.shouldVisitTranslationUnit) {
|
if (action.shouldVisitTranslationUnit) {
|
||||||
switch (action.visit(this)) {
|
switch (action.visit(this)) {
|
||||||
case ASTVisitor.PROCESS_ABORT : return false;
|
case ASTVisitor.PROCESS_ABORT: return false;
|
||||||
case ASTVisitor.PROCESS_SKIP : return true;
|
case ASTVisitor.PROCESS_SKIP: return true;
|
||||||
default : break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IASTDeclaration[] decls = getDeclarations(action.includeInactiveNodes);
|
IASTDeclaration[] decls = getDeclarations(action.includeInactiveNodes);
|
||||||
|
@ -275,7 +275,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat
|
||||||
public final IASTFileLocation flattenLocationsToFile(IASTNodeLocation[] nodeLocations) {
|
public final IASTFileLocation flattenLocationsToFile(IASTNodeLocation[] nodeLocations) {
|
||||||
if (fLocationResolver == null)
|
if (fLocationResolver == null)
|
||||||
return null;
|
return null;
|
||||||
return fLocationResolver.flattenLocations( nodeLocations );
|
return fLocationResolver.flattenLocations(nodeLocations);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final IDependencyTree getDependencyTree() {
|
public final IDependencyTree getDependencyTree() {
|
||||||
|
@ -287,7 +287,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat
|
||||||
public final String getContainingFilename(int offset) {
|
public final String getContainingFilename(int offset) {
|
||||||
if (fLocationResolver == null)
|
if (fLocationResolver == null)
|
||||||
return EMPTY_STRING;
|
return EMPTY_STRING;
|
||||||
return fLocationResolver.getContainingFilePath( offset );
|
return fLocationResolver.getContainingFilePath(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final IIndex getIndex() {
|
public final IIndex getIndex() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue