Community
Participate
Working Groups
If I type IPL3 in the open type dialog, I would want IPerspectiveListener3 as a match.
Makes sense to me. Dirk?
Agree
Moving to Core. We are now reusing camel case matching routines defined in Core.
Need to think about it. In this case, it probably makes sense, but what about middle digit characters (if any). Unclear whether digits are significant in general in names. UTF16DocumentScannerSupport will be painful to reach if we do this.
*** Bug 99195 has been marked as a duplicate of this bug. ***
Perhaps, results with numbers can be hit both with or without numbers? So, UTF16DSS and UTFDSS would both find UTF16DocumentScannerSupport.
*** Bug 119842 has been marked as a duplicate of this bug. ***
*** Bug 121130 has been marked as a duplicate of this bug. ***
It's also not possible to use a '*', e.g. when trying to enter IDocumentExtension3 "IDE*3" doesn't work.
Too late to work on this enhancement => defer to 3.3
Can this now be reopened?
Of course...
*** Bug 170842 has been marked as a duplicate of this bug. ***
Unfortunately, I have to defer this again to next release...
Also see bug 176017. Every change to JDT/Core's SearchPattern potentially breaks the Open Type dialog (same for changes in Platfom/UI's SearchPattern).
*** Bug 196804 has been marked as a duplicate of this bug. ***
Created attachment 75758 [details] Proposed patch
Created attachment 75766 [details] Corresponding patch for org.eclipse.ui.workbench Here's a patch to apply on org.eclipse.ui.workbench project (version I20070802-0800) to have corresponding changes in org.eclipse.ui.dialogs.SearchPattern. I agree with Markus that bug 176017 definitely and urgently needs to be fixed as this is really a pain to maintain both versions of code. Note that I already simplified JDT/Core code by removing code duplicates between SearchPattern and CharOperation (see my previous patch to apply on org.eclipse.jdt.core project...)
Markus, All JDT/Core + JDT/UI tests pass with this patch. Please let me know if this OK for you that I release the JDT/Core patch or if you think it could break something in Open Type dialog... Thanks
I'll take care of bug 176017 asap. I would prefer if you could keep this fix back until bug 176017 is resolved. We don't have many automated tests in that area, so I can't tell whether it would break the Open Type dialog without extensive testing -- which I won't do now just to do it again after I've fixed bug 176017. But if you've tested the Open Type dialog a bit and love to take risks, you can also release it...
I do prefer not to take any risk! So, I'll wait until bug 176017 is fixed...
Released for 3.4M2 in HEAD.
The fix in HEAD does not seem to work properly. With these classes: class MyClass1 {} class MyClass123 {} class MyClass123Extension {} class MyClass123Extension1 {} ... neither MC1 nor MyCla1 matched anything.
I missed the fact that matchRule was verified using validateMatchRule(String, int) of SearchPattern. A digit is now a valid char (when not the first) for camel case patterns...
Created attachment 76257 [details] Additional patch
Additional patch released in HEAD.
In HEAD, MC2 and MC13 both match all the MyClass123* classes from comment 23. I would have expected that these patterns don't match. IMO, the first digit of each multi-digit number should be considered as uppercase letter, and the other digits as lowercase letters.
(In reply to comment #27) > IMO, the first digit of each multi-digit number should be considered as > uppercase letter, and the other digits as lowercase letters. > This is more restrictive and I'm afraid some other users will complain that you need to know the numbers order while hitting the pattern to get the correct matches... Several digits in sequence are seldom used in Java identifiers, so I would prefer let the current implementation more permissive and see if we got complains about it. The hidden reason for waiting is that more restrictive implementation will request a more complex and slower algorithm. All users will then be penalized and I do not want to go this way unless a strong need is identified.
(In reply to comment #27) > In HEAD, MC2 and MC13 both match all the MyClass123* classes from comment 23. I > would have expected that these patterns don't match. I would've expected the same, although I don't think the answer is to treat only the first digit of each multi-digit number as upper-case. I think each number should be treated as upper-case. The class ABCD can't be found with "ABD", and it should be the same way with numbers. I know this contradicts what I said in comment 6.
(In reply to comment #29) > I would've expected the same, although I don't think the answer is to treat > only the first digit of each multi-digit number as upper-case. I think each > number should be treated as upper-case. The class ABCD can't be found with > "ABD", and it should be the same way with numbers. > > I know this contradicts what I said in comment 6. > My opinion is that without real specification, the safer implementation is allow both cases. That's why digits are considered as uppercase character but are also tolerated as lowercase characters in the algorithm. I do not think one implementation may satisfy all users (since I released this fix, 2 remarks = 2 different ways to treat digits in the patterns...). So, I'd strongly prefer in this case to be more permissive and return too much matches than not enough. However, if the number of valid matches would be really too large, then I'd agree to make the algorithm more restrictive. But it seems that this test case hasn't been experimented by any user yet...
Verified for 3.4 M2 using build I20070917-0010.
I was about to open a new bug because this behavior is not working (to my knowledge, I have never seen it work). I have a class 'CommTablesFactory2'. I type 'CTF2' in the "Open Resource" window, and it does not appear. Should I open a new bug, or should this bug be reopened?
(In reply to comment #32) > I was about to open a new bug because this behavior is not working (to my > knowledge, I have never seen it work). I have a class 'CommTablesFactory2'. > I type 'CTF2' in the "Open Resource" window, and it does not appear. Should > I open a new bug, or should this bug be reopened? This bug here is for Java (Open Type) and *is* fixed. Please file a new bug against Platform IDE (Open Resource).
Sorry, it wasn't clear from the bug that it referred only to the Open Type dialog. I'll open a new bug.