Index: compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java,v retrieving revision 1.108 diff -u -r1.108 SourceTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 16 Jun 2005 14:37:22 -0000 1.108 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 21 Jun 2005 18:09:49 -0000 @@ -28,6 +28,7 @@ import org.eclipse.jdt.internal.compiler.ast.TypeReference; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; import org.eclipse.jdt.internal.compiler.impl.Constant; +import org.eclipse.jdt.internal.compiler.util.Util; public class SourceTypeBinding extends ReferenceBinding { public ReferenceBinding superclass; @@ -577,6 +578,10 @@ if (uniqueKey.length == 2) return uniqueKey; // problem type's unique key is "L;" int start = CharOperation.lastIndexOf('/', this.fileName) + 1; int end = CharOperation.lastIndexOf('.', this.fileName); + if (Util.isClassFileName(this.fileName)) { +// if (isMemberType()) + return uniqueKey; + } if (end != -1) { char[] mainTypeName = CharOperation.subarray(this.fileName, start, end); start = CharOperation.lastIndexOf('/', uniqueKey) + 1; Index: dom/org/eclipse/jdt/core/dom/TypeBinding.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java,v retrieving revision 1.104 diff -u -r1.104 TypeBinding.java --- dom/org/eclipse/jdt/core/dom/TypeBinding.java 15 Jun 2005 16:29:45 -0000 1.104 +++ dom/org/eclipse/jdt/core/dom/TypeBinding.java 21 Jun 2005 18:09:50 -0000 @@ -399,7 +399,22 @@ if (Util.isClassFileName(fileName)) { ClassFile classFile = (ClassFile) getClassFile(fileName); if (classFile == null) return null; - return (JavaElement) classFile.getType(); + IType type = classFile.getType(); + if (type.getElementName().length() == 0) { + // We still have a problem here... + return null; + } + String bindingName = new String(referenceBinding.sourceName); + if (type.getElementName().equals(bindingName)) { + return (JavaElement) type; + } + type = type.getType(bindingName); + if (type.exists()) { + if (type.getElementName().equals(bindingName)) { + return (JavaElement) type; + } + } + return null; } if (referenceBinding.isLocalType() || referenceBinding.isAnonymousType()) { // local or anonymous type