Community
Participate
Working Groups
TypeDeclarationPattern's char classOrInterface is being used to create a key in createIndexKey(). The key for a search without specifying typename, packagename, enclosingname will become [*, /, C] if classOrInterface is set to IIndexConstants.CLASS_SUFFIX. Index entries of e.g. toplevel types in the default package will look like [S, o, m, e, T, y, p, e, /, /, /, C] Now in DiskIndex.addQueryResults(), Index.isMatch(key, word, matchRule) is called, which will run a CharOperation.match(pattern, word, false) (pattern match). This returns false, although it should be a match. CharOperation.match() is probably not greedy wrt the '*', i.e. the '*' doesn't include the first two slashes. When searching with TYPE_SUFFIX, the generated key will be null, where CharOperation.match() returns true.
The problem is that case insensitive searches need a complete lowercase pattern... so we need to generate a key of [*, /, c]
Verified for 3.1 M2 with build I200409231635. I've written test case which fails with 3.1 M1 and pass with 3.1 M2. I'll release it in HEAD stream.
Thanks Kent and Frédéric!
you're welcome :-) [jdt-core-internal] Test case testTypeDeclarationBug73696 added and released in HEAD