View | Details | Raw Unified | Return to bug 100636 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java (+5 lines)
Lines 28-33 Link Here
28
import org.eclipse.jdt.internal.compiler.ast.TypeReference;
28
import org.eclipse.jdt.internal.compiler.ast.TypeReference;
29
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
29
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
30
import org.eclipse.jdt.internal.compiler.impl.Constant;
30
import org.eclipse.jdt.internal.compiler.impl.Constant;
31
import org.eclipse.jdt.internal.compiler.util.Util;
31
32
32
public class SourceTypeBinding extends ReferenceBinding {
33
public class SourceTypeBinding extends ReferenceBinding {
33
	public ReferenceBinding superclass;
34
	public ReferenceBinding superclass;
Lines 577-582 Link Here
577
	if (uniqueKey.length == 2) return uniqueKey; // problem type's unique key is "L;"
578
	if (uniqueKey.length == 2) return uniqueKey; // problem type's unique key is "L;"
578
	int start = CharOperation.lastIndexOf('/', this.fileName) + 1;
579
	int start = CharOperation.lastIndexOf('/', this.fileName) + 1;
579
	int end = CharOperation.lastIndexOf('.', this.fileName);
580
	int end = CharOperation.lastIndexOf('.', this.fileName);
581
	if (Util.isClassFileName(this.fileName)) {
582
//		if (isMemberType())
583
			return uniqueKey;
584
	}
580
	if (end != -1) {
585
	if (end != -1) {
581
		char[] mainTypeName = CharOperation.subarray(this.fileName, start, end);
586
		char[] mainTypeName = CharOperation.subarray(this.fileName, start, end);
582
		start = CharOperation.lastIndexOf('/', uniqueKey) + 1;
587
		start = CharOperation.lastIndexOf('/', uniqueKey) + 1;
(-)dom/org/eclipse/jdt/core/dom/TypeBinding.java (-1 / +16 lines)
Lines 399-405 Link Here
399
		if (Util.isClassFileName(fileName)) {
399
		if (Util.isClassFileName(fileName)) {
400
			ClassFile classFile = (ClassFile) getClassFile(fileName);
400
			ClassFile classFile = (ClassFile) getClassFile(fileName);
401
			if (classFile == null) return null;
401
			if (classFile == null) return null;
402
			return (JavaElement) classFile.getType();
402
			IType type = classFile.getType();
403
			if (type.getElementName().length() == 0) {
404
				// We still have a problem here...
405
				return null;
406
			}
407
			String bindingName = new String(referenceBinding.sourceName);
408
			if (type.getElementName().equals(bindingName)) {
409
				return (JavaElement) type;
410
			}
411
			type = type.getType(bindingName);
412
			if (type.exists()) {
413
				if (type.getElementName().equals(bindingName)) {
414
					return (JavaElement) type;
415
				}
416
			}
417
			return null;
403
		}
418
		}
404
		if (referenceBinding.isLocalType() || referenceBinding.isAnonymousType()) {
419
		if (referenceBinding.isLocalType() || referenceBinding.isAnonymousType()) {
405
			// local or anonymous type
420
			// local or anonymous type

Return to bug 100636