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

Collapse All | Expand All

(-)model/org/eclipse/jdt/core/IJavaProject.java (-20 / +4 lines)
Lines 165-175 Link Here
165
	 * a class B defined as a member type of a class A in package x.y should have a 
165
	 * a class B defined as a member type of a class A in package x.y should have a 
166
	 * the fully qualified name "x.y.A.B".
166
	 * the fully qualified name "x.y.A.B".
167
	 * 
167
	 * 
168
	 * Note that in order to be found, a type name (or its toplevel enclosing
168
	 * Secondary types can be found using this functionality. 
169
	 * type name) must match its corresponding compilation unit name. As a 
170
	 * consequence, secondary types cannot be found using this functionality.
171
	 * Secondary types can however be explicitely accessed through their enclosing
172
	 * unit or found by the <code>SearchEngine</code>.
173
	 * 
169
	 * 
174
	 * @param fullyQualifiedName the given fully qualified name
170
	 * @param fullyQualifiedName the given fully qualified name
175
	 * @exception JavaModelException if this project does not exist or if an
171
	 * @exception JavaModelException if this project does not exist or if an
Lines 189-199 Link Here
189
	 * If the returned type is part of a compilation unit, its owner is the given
185
	 * If the returned type is part of a compilation unit, its owner is the given
190
	 * owner.
186
	 * owner.
191
	 * 
187
	 * 
192
	 * Note that in order to be found, a type name (or its toplevel enclosing
188
	 * Secondary types can be found using this functionality. 
193
	 * type name) must match its corresponding compilation unit name. As a 
194
	 * consequence, secondary types cannot be found using this functionality.
195
	 * Secondary types can however be explicitely accessed through their enclosing
196
	 * unit or found by the <code>SearchEngine</code>.
197
	 * 
189
	 * 
198
	 * @param fullyQualifiedName the given fully qualified name
190
	 * @param fullyQualifiedName the given fully qualified name
199
	 * @param owner the owner of the returned type's compilation unit
191
	 * @param owner the owner of the returned type's compilation unit
Lines 214-224 Link Here
214
	 * a class B defined as a member type of a class A should have the 
206
	 * a class B defined as a member type of a class A should have the 
215
	 * type qualified name "A.B".
207
	 * type qualified name "A.B".
216
	 * 
208
	 * 
217
	 * Note that in order to be found, a type name (or its toplevel enclosing
209
	 * Secondary types can be found using this functionality. 
218
	 * type name) must match its corresponding compilation unit name. As a 
219
	 * consequence, secondary types cannot be found using this functionality.
220
	 * Secondary types can however be explicitely accessed through their enclosing
221
	 * unit or found by the <code>SearchEngine</code>.
222
	 * 
210
	 * 
223
	 * @param packageName the given package name
211
	 * @param packageName the given package name
224
	 * @param typeQualifiedName the given type qualified name
212
	 * @param typeQualifiedName the given type qualified name
Lines 242-252 Link Here
242
	 * If the returned type is part of a compilation unit, its owner is the given
230
	 * If the returned type is part of a compilation unit, its owner is the given
243
	 * owner.
231
	 * owner.
244
	 * 
232
	 * 
245
	 * Note that in order to be found, a type name (or its toplevel enclosing
233
	 * Secondary types can be found using this functionality. 
246
	 * type name) must match its corresponding compilation unit name. As a 
247
	 * consequence, secondary types cannot be found using this functionality.
248
	 * Secondary types can however be explicitely accessed through their enclosing
249
	 * unit or found by the <code>SearchEngine</code>.
250
	 * 
234
	 * 
251
	 * @param packageName the given package name
235
	 * @param packageName the given package name
252
	 * @param typeQualifiedName the given type qualified name
236
	 * @param typeQualifiedName the given type qualified name
(-)model/org/eclipse/jdt/internal/core/NameLookup.java (-4 / +4 lines)
Lines 541-552 Link Here
541
		SingleTypeRequestor typeRequestor = new SingleTypeRequestor();
541
		SingleTypeRequestor typeRequestor = new SingleTypeRequestor();
542
		seekTypes(name, pkg, partialMatch, acceptFlags, typeRequestor);
542
		seekTypes(name, pkg, partialMatch, acceptFlags, typeRequestor);
543
		IType type = typeRequestor.getType();
543
		IType type = typeRequestor.getType();
544
//		if (type == null)
544
		if (type == null) {
545
//			type = findSecondaryType(name, pkg, partialMatch, acceptFlags);
545
			type = findSecondaryType(name, pkg, partialMatch, acceptFlags);
546
		}
546
		return type;
547
		return type;
547
	}
548
	}
548
549
549
	// TODO (kent) enable once index support is in
550
	IType findSecondaryType(String typeName, IPackageFragment pkg, boolean partialMatch, final int acceptFlags) {
550
	IType findSecondaryType(String typeName, IPackageFragment pkg, boolean partialMatch, final int acceptFlags) {
551
		try {
551
		try {
552
			final ArrayList paths = new ArrayList();
552
			final ArrayList paths = new ArrayList();
Lines 582-588 Link Here
582
				IJavaSearchConstants.TYPE,
582
				IJavaSearchConstants.TYPE,
583
				SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg}, false),
583
				SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg}, false),
584
				nameRequestor,
584
				nameRequestor,
585
				IJavaSearchConstants.CANCEL_IF_NOT_READY_TO_SEARCH,
585
				IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
586
				null);
586
				null);
587
587
588
			if (!paths.isEmpty()) {
588
			if (!paths.isEmpty()) {

Return to bug 36032