mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
f045947eb5
commit
f7e376cfc7
1 changed files with 5 additions and 10 deletions
|
@ -158,7 +158,7 @@ public class ASTManager {
|
||||||
if (name instanceof ICPPASTQualifiedName) {
|
if (name instanceof ICPPASTQualifiedName) {
|
||||||
IASTName names[]= ((ICPPASTQualifiedName) name).getNames();
|
IASTName names[]= ((ICPPASTQualifiedName) name).getNames();
|
||||||
if (names.length > 0) {
|
if (names.length > 0) {
|
||||||
name= names[names.length-1];
|
name= names[names.length - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
|
@ -324,8 +324,6 @@ public class ASTManager {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (node1 instanceof IASTTranslationUnit &&
|
if (node1 instanceof IASTTranslationUnit &&
|
||||||
node2 instanceof IASTTranslationUnit) {
|
node2 instanceof IASTTranslationUnit) {
|
||||||
return hasSameLocation(node1, node2, fileStatic);
|
return hasSameLocation(node1, node2, fileStatic);
|
||||||
|
@ -474,7 +472,6 @@ public class ASTManager {
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static int isSameType(IType t1, IType t2) throws DOMException {
|
private static int isSameType(IType t1, IType t2) throws DOMException {
|
||||||
if (t1 != null && t2 != null && t1.isSameType(t2)) {
|
if (t1 != null && t2 != null && t1.isSameType(t2)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -803,8 +800,6 @@ public class ASTManager {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ASTManager(CRefactoringArgument arg) {
|
public ASTManager(CRefactoringArgument arg) {
|
||||||
fArgument= arg;
|
fArgument= arg;
|
||||||
}
|
}
|
||||||
|
@ -832,7 +827,7 @@ public class ASTManager {
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
if (name instanceof ICPPASTQualifiedName) {
|
if (name instanceof ICPPASTQualifiedName) {
|
||||||
IASTName[] na= ((ICPPASTQualifiedName) name).getNames();
|
IASTName[] na= ((ICPPASTQualifiedName) name).getNames();
|
||||||
name= na[na.length-1];
|
name= na[na.length - 1];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
IASTNode node= nodeSelector.findEnclosingNode(offset, length);
|
IASTNode node= nodeSelector.findEnclosingNode(offset, length);
|
||||||
|
@ -877,7 +872,7 @@ public class ASTManager {
|
||||||
|
|
||||||
private String extractIdentifier(String rawSignature, int offset, int length) {
|
private String extractIdentifier(String rawSignature, int offset, int length) {
|
||||||
char[] sig= rawSignature.toCharArray();
|
char[] sig= rawSignature.toCharArray();
|
||||||
int end= offset+length;
|
int end= offset + length;
|
||||||
if (offset < 0 || end > sig.length)
|
if (offset < 0 || end > sig.length)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -908,7 +903,7 @@ public class ASTManager {
|
||||||
if (celem instanceof ITranslationUnit) {
|
if (celem instanceof ITranslationUnit) {
|
||||||
ITranslationUnit tu= (ITranslationUnit) celem;
|
ITranslationUnit tu= (ITranslationUnit) celem;
|
||||||
int options= ITranslationUnit.AST_CONFIGURE_USING_SOURCE_CONTEXT |
|
int options= ITranslationUnit.AST_CONFIGURE_USING_SOURCE_CONTEXT |
|
||||||
ITranslationUnit.AST_SKIP_INDEXED_HEADERS;
|
ITranslationUnit.AST_SKIP_INDEXED_HEADERS;
|
||||||
try {
|
try {
|
||||||
ast= tu.getAST(index, options);
|
ast= tu.getAST(index, options);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
@ -931,7 +926,7 @@ public class ASTManager {
|
||||||
|
|
||||||
int count= store.getFileCount();
|
int count= store.getFileCount();
|
||||||
String taskName= RenameMessages.ASTManager_task_generateAst;
|
String taskName= RenameMessages.ASTManager_task_generateAst;
|
||||||
monitor.beginTask(taskName, 2*count);
|
monitor.beginTask(taskName, 2 * count);
|
||||||
monitor.setTaskName(taskName);
|
monitor.setTaskName(taskName);
|
||||||
|
|
||||||
List<IFile> files= store.getFileList();
|
List<IFile> files= store.getFileList();
|
||||||
|
|
Loading…
Add table
Reference in a new issue