Index: model/org/eclipse/jdt/core/IJavaProject.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java,v retrieving revision 1.75 diff -u -r1.75 IJavaProject.java --- model/org/eclipse/jdt/core/IJavaProject.java 23 May 2005 09:57:38 -0000 1.75 +++ model/org/eclipse/jdt/core/IJavaProject.java 4 Aug 2005 11:54:58 -0000 @@ -165,11 +165,7 @@ * a class B defined as a member type of a class A in package x.y should have a * the fully qualified name "x.y.A.B". * - * Note that in order to be found, a type name (or its toplevel enclosing - * type name) must match its corresponding compilation unit name. As a - * consequence, secondary types cannot be found using this functionality. - * Secondary types can however be explicitely accessed through their enclosing - * unit or found by the SearchEngine. + * Secondary types can be found using this functionality. * * @param fullyQualifiedName the given fully qualified name * @exception JavaModelException if this project does not exist or if an @@ -189,11 +185,7 @@ * If the returned type is part of a compilation unit, its owner is the given * owner. * - * Note that in order to be found, a type name (or its toplevel enclosing - * type name) must match its corresponding compilation unit name. As a - * consequence, secondary types cannot be found using this functionality. - * Secondary types can however be explicitely accessed through their enclosing - * unit or found by the SearchEngine. + * Secondary types can be found using this functionality. * * @param fullyQualifiedName the given fully qualified name * @param owner the owner of the returned type's compilation unit @@ -214,11 +206,7 @@ * a class B defined as a member type of a class A should have the * type qualified name "A.B". * - * Note that in order to be found, a type name (or its toplevel enclosing - * type name) must match its corresponding compilation unit name. As a - * consequence, secondary types cannot be found using this functionality. - * Secondary types can however be explicitely accessed through their enclosing - * unit or found by the SearchEngine. + * Secondary types can be found using this functionality. * * @param packageName the given package name * @param typeQualifiedName the given type qualified name @@ -242,11 +230,7 @@ * If the returned type is part of a compilation unit, its owner is the given * owner. * - * Note that in order to be found, a type name (or its toplevel enclosing - * type name) must match its corresponding compilation unit name. As a - * consequence, secondary types cannot be found using this functionality. - * Secondary types can however be explicitely accessed through their enclosing - * unit or found by the SearchEngine. + * Secondary types can be found using this functionality. * * @param packageName the given package name * @param typeQualifiedName the given type qualified name Index: model/org/eclipse/jdt/internal/core/NameLookup.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java,v retrieving revision 1.89 diff -u -r1.89 NameLookup.java --- model/org/eclipse/jdt/internal/core/NameLookup.java 22 Jun 2005 14:45:03 -0000 1.89 +++ model/org/eclipse/jdt/internal/core/NameLookup.java 4 Aug 2005 11:54:59 -0000 @@ -541,12 +541,12 @@ SingleTypeRequestor typeRequestor = new SingleTypeRequestor(); seekTypes(name, pkg, partialMatch, acceptFlags, typeRequestor); IType type = typeRequestor.getType(); -// if (type == null) -// type = findSecondaryType(name, pkg, partialMatch, acceptFlags); + if (type == null) { + type = findSecondaryType(name, pkg, partialMatch, acceptFlags); + } return type; } - // TODO (kent) enable once index support is in IType findSecondaryType(String typeName, IPackageFragment pkg, boolean partialMatch, final int acceptFlags) { try { final ArrayList paths = new ArrayList(); @@ -582,7 +582,7 @@ IJavaSearchConstants.TYPE, SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg}, false), nameRequestor, - IJavaSearchConstants.CANCEL_IF_NOT_READY_TO_SEARCH, + IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null); if (!paths.isEmpty()) {