Bug 109724 - UI: Code Completion should ignore case
Summary: UI: Code Completion should ignore case
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 4.0 M6   Edit
Assignee: Andrew Ferguson CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on: 175275
Blocks:
  Show dependency tree
 
Reported: 2005-09-16 06:32 EDT by Simon Bitschnau CLA
Modified: 2009-01-09 15:00 EST (History)
3 users (show)

See Also:


Attachments
proposed patch (20.66 KB, patch)
2007-02-23 14:58 EST, Bryan Wilkinson CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Bitschnau CLA 2005-09-16 06:32:39 EDT
The code completion should ignore the case while typing. 

If I have a class MyClass and type "myc" and then STRG+Space the codecompletion 
should provide MyClass for selection as well.
Comment 1 Doug Schaefer CLA 2005-09-16 08:38:41 EDT
I agree. Unfortunately our new DOM framework did not have that capability in 
CDT 3.0. We'll definitely take another look in 3.1.
Comment 2 Doug Schaefer CLA 2006-05-23 15:59:09 EDT
Maybe not...
Comment 3 Andrew Ferguson CLA 2007-02-23 12:11:25 EST
marking as FIXED
Comment 4 Andrew Ferguson CLA 2007-02-23 12:51:55 EST
Re-opening - not all content assist cases related to this are passing.

Bryan Wilkinson said:
>I just had one concern regarding PDOMCPPNamespace.find(String name, boolean
>prefixLookup).  The visitor created in this method is set to always be case
>sensitive.  For content assist at least, case-sensitivity would need to depend
>on whether or not it is a prefix lookup.  So passing '!prefixLookup' instead of
>'true' to the visitor's contructor would work for content assist, or else
>another boolean parameter for the find(...) method would be needed.
>
>In fact, are there any situations in which we need to control case-sensitivity
>independently of whether or not a prefix lookup is taking place?  If this is
>the case then it might be wise to remove any 'caseSensitive' booleans and
>simply make case-sensitivity depend on the 'prefixLookup' booleans which
>already existed.

Bryan - if you're happy to fix up the remaining content assist cases I'll take a look at the patches. Otherwise, I'll try to take a look at this after my indexing work is complete. I've no strong feelings about whether caseSensitivity needs independent control (the OpenTypeDialog always does case-insensitive lookup now)

thanks,
Andrew
Comment 5 Bryan Wilkinson CLA 2007-02-23 13:02:12 EST
Fixing up the remaining content assist cases shouldn't be a problem.  I'll hopefully have a patch ready soon.
Comment 6 Bryan Wilkinson CLA 2007-02-23 14:58:43 EST
Created attachment 59705 [details]
proposed patch

Patch ensures that all means used to search for bindings for content assist are case-insensitive.
Comment 7 Andrew Ferguson CLA 2007-02-26 04:12:12 EST
verified and applied to HEAD, thanks!
Comment 8 Anton Leherbauer CLA 2007-03-19 06:18:06 EDT
I suppose this one can be closed now.
Comment 9 Andrew Ferguson CLA 2007-03-19 06:54:38 EDT
I've left it open as there are still some unit tests that reference this bug, which are marked as expected to fail (setExpectFailure)

I've not looked into these though
Comment 10 Andrew Ferguson CLA 2007-03-19 06:57:02 EDT
searching for this bug's number in the tests shows these two are still marked to fail (?)

org.eclipse.cdt.ui.tests.text.contentassist2.CompletionTest_NewTypeReference_Prefix
org.eclipse.cdt.ui.tests.text.contentassist2.CompletionTest_SingleName_Method_Prefix
Comment 11 Anton Leherbauer CLA 2007-03-20 07:41:29 EDT
(In reply to comment #10)
Thanks for the reminder, I forgot to update them. In fact there are three tests which actually pass: org.eclipse.cdt.ui.tests.text.contentassist2.CompletionTest_NewTypeReference_NoPrefix org.eclipse.cdt.ui.tests.text.contentassist2.CompletionTest_NewTypeReference_Prefix org.eclipse.cdt.ui.tests.text.contentassist2.CompletionTest_SingleName_Method_Prefix
At least they are not (no longer) related to this bug.
Comment 12 Doug Schaefer CLA 2008-06-03 15:02:42 EDT
assigning
Comment 13 Doug Schaefer CLA 2008-06-03 15:03:02 EDT
done