mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 15:25:49 +02:00
Follow up for deprecated methods in IASTTranslationUnit.
This commit is contained in:
parent
b3d789e035
commit
439c8752eb
1 changed files with 9 additions and 7 deletions
|
@ -85,13 +85,15 @@ public abstract class ASTNode implements IASTNode {
|
||||||
if (length == 0) {
|
if (length == 0) {
|
||||||
locations= EMPTY_LOCATION_ARRAY;
|
locations= EMPTY_LOCATION_ARRAY;
|
||||||
}
|
}
|
||||||
final IASTTranslationUnit tu= getTranslationUnit();
|
else {
|
||||||
if (tu != null) {
|
final IASTTranslationUnit tu= getTranslationUnit();
|
||||||
org.eclipse.cdt.internal.core.parser.scanner2.ILocationResolver l= (org.eclipse.cdt.internal.core.parser.scanner2.ILocationResolver) tu.getAdapter(org.eclipse.cdt.internal.core.parser.scanner2.ILocationResolver.class);
|
if (tu != null) {
|
||||||
if (l != null) {
|
org.eclipse.cdt.internal.core.parser.scanner2.ILocationResolver l= (org.eclipse.cdt.internal.core.parser.scanner2.ILocationResolver) tu.getAdapter(org.eclipse.cdt.internal.core.parser.scanner2.ILocationResolver.class);
|
||||||
locations= l.getLocations(offset, length);
|
if (l != null) {
|
||||||
}
|
locations= l.getLocations(offset, length);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return locations;
|
return locations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue