Bug 200400 - [search] Camel Case match prefix insensitive although spec says prefix sensitive
Summary: [search] Camel Case match prefix insensitive although spec says prefix sensitive
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 124624
Blocks:
  Show dependency tree
 
Reported: 2007-08-17 12:44 EDT by Frederic Fusier CLA
Modified: 2007-09-18 03:19 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2007-08-17 12:44:25 EDT
Since 3.2 I guess...

After having rewrote javadoc comment for SearchPattern#R_CAMELCASE_MATCH as described in bug 124624 comment 17, I also wrote some tests to verify that it works as expected...

And I was really disappointed when I discovered that in fact, Camel Case behaves currently (and since the beginning I'm quite sure...) as prefix match and case *insensitive* match rules!

It means that 'NULL' pattern will match 'NullPointerException'. User can easily verify this behavior in the Open Type dialog...
Comment 1 Frederic Fusier CLA 2007-08-17 12:52:11 EDT
Markus,

The patch for bug 124624, I'm currently working on, already fixes this issue (this is in fact how I discovered this wrong behavior). But change this behavior will have an impact on backward compatibility usage, as enter 'NULL' in Open Type dialog will no longer return any match...

So, we need to synchronize with you if you want to keep the current behavior in Open Type dialog and then add SearchPattern.R_PREFIX_MATCH to accept insensitive prefix (as I plan to explain in the new javadoc comment of R_CAMELCASE_MATCH - see bug 124624 comment 17).

Of course, if you think that current behavior is not good and only case sensitive prefix should match, then you'll have nothing to change...

Just let me know, thanks
Comment 2 Frederic Fusier CLA 2007-08-23 05:35:44 EDT
Decision on this point was made: current SearchPattern#R_CAMELCASE_MATCH constant will still behave as it usually did in 3.3. The javadoc comment will be updated to  describe the real behavior of SearchEngine while using this constant.

However, as a new constant was necessary for bug 124624, we'll depreciate SearchPattern#R_CAMELCASE_MATCH and will advice users to only use the new one (SearchPattern#R_CAMEL_CASE_MATCH).

We need to do it as previous SearchPattern#R_CAMELCASE_MATCH had unsolvable design issues... Of course this depreciated constant will always be accepted by SearchEngine and will be equivalent to the combination of SearchPattern#R_CAMELCASE_MATCH and SearchPattern#R_PREFIX_MATCH
Comment 3 Frederic Fusier CLA 2007-08-24 02:02:02 EDT
Patch released for 3.4M2 in HEAD stream (see patch attached to bug 124624).
Comment 4 Eric Jodet CLA 2007-09-18 01:30:55 EDT
(In reply to comment #3)
Verified for 3.4 M2 using build I20070917-0010.