Lines 712-726
Link Here
|
712 |
if (simpleTypeName.equals(binaryTypeQualifiedName)) |
712 |
if (simpleTypeName.equals(binaryTypeQualifiedName)) |
713 |
return binaryType; // answer only top-level types, sometimes the classFile is for a member/local type |
713 |
return binaryType; // answer only top-level types, sometimes the classFile is for a member/local type |
714 |
|
714 |
|
715 |
try { |
715 |
// type name may be null for anonymous (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=164791) |
716 |
// type name may be null for anonymous (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=164791) |
716 |
String classFileName = simpleTypeName.length() == 0 ? binaryTypeQualifiedName : simpleTypeName; |
717 |
String classFileName = simpleTypeName.length() == 0 ? binaryTypeQualifiedName : simpleTypeName; |
717 |
IClassFile classFile = binaryType.getPackageFragment().getClassFile(classFileName + SuffixConstants.SUFFIX_STRING_class); |
718 |
IClassFile classFile = binaryType.getPackageFragment().getClassFile(classFileName + SuffixConstants.SUFFIX_STRING_class); |
718 |
return classFile.getType(); |
719 |
return classFile.getType(); |
|
|
720 |
} catch (JavaModelException e) { |
721 |
// ignore as implementation of getType() cannot throw this exception |
722 |
} |
723 |
return null; |
724 |
} |
719 |
} |
725 |
protected boolean encloses(IJavaElement element) { |
720 |
protected boolean encloses(IJavaElement element) { |
726 |
return element != null && this.scope.encloses(element); |
721 |
return element != null && this.scope.encloses(element); |