Lines 657-672
Link Here
|
657 |
} else { |
657 |
} else { |
658 |
// cache binary type binding |
658 |
// cache binary type binding |
659 |
ClassFile classFile = (ClassFile)openable; |
659 |
ClassFile classFile = (ClassFile)openable; |
660 |
IBinaryType binaryType = null; |
660 |
IBinaryType binaryType = (IBinaryType) JavaModelManager.getJavaModelManager().getInfo(classFile.getType()); |
661 |
if (classFile.isOpen()) { |
661 |
if (binaryType == null) { |
662 |
// create binary type from info |
|
|
663 |
IType type = classFile.getType(); |
664 |
try { |
665 |
binaryType = (IBinaryType)((JavaElement)type).getElementInfo(); |
666 |
} catch (JavaModelException e) { |
667 |
// type exists since class file is opened |
668 |
} |
669 |
} else { |
670 |
// create binary type from file |
662 |
// create binary type from file |
671 |
if (classFile.getPackageFragmentRoot().isArchive()) { |
663 |
if (classFile.getPackageFragmentRoot().isArchive()) { |
672 |
binaryType = this.builder.createInfoFromClassFileInJar(classFile); |
664 |
binaryType = this.builder.createInfoFromClassFileInJar(classFile); |