public class ParserUtil {
- public static SingleTypeReference getTypeReference(Scanner scanner, List includesList, char[] ident) {
+ public static SingleTypeReference getTypeReference(Scanner scanner,
+ List includesList, char[] ident) {
String identStr = new String(ident);
ImportReference ir;
IFile file = null;
ir = (ImportReference) includesList.get(i);
file = ir.getFile();
if (file != null) {
- ICompilationUnit unit = JavaCore.createCompilationUnitFrom(file);
+ ICompilationUnit unit = JavaCore
+ .createCompilationUnitFrom(file);
if (unit != null) {
try {
- // TODO avoid recursion here. Sometimes we get a java.lang.StackOverflowError
+ // TODO avoid recursion here. Sometimes we get a
+ // java.lang.StackOverflowError
IType[] types = unit.getAllTypes();
if (types != null) {
for (int j = 0; j < types.length; j++) {
if (types[j].getElementName().equals(identStr)) {
- return new SingleTypeReference(file, ident, scanner.getCurrentTokenStartPosition(), scanner
- .getCurrentTokenEndPosition());
+ return new SingleTypeReference(
+ file,
+ ident,
+ scanner
+ .getCurrentTokenStartPosition(),
+ scanner
+ .getCurrentTokenEndPosition());
}
}
}