This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 212412

Summary: Patch for: Support subword completion
Product: java Reporter: markiewb
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: markiewb
Priority: P3 Keywords: PATCH_AVAILABLE
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Proposed patch for subword completion
Patch in action
Proposed patch for subword completion v2
Proposed patch v3 - with option panel config
Patch in action - with option panel config

Description markiewb 2012-05-12 00:28:07 UTC
In the new Eclipse JDT "subword completion" is supported. Can this be implemented in NetBeans too?

More details (with screenshots) at http://blog.deepakazad.com/2012/05/subwords-completion.html
Comment 1 markiewb 2012-11-21 21:27:00 UTC
Created attachment 128231 [details]
Proposed patch for subword completion

@NetBeans-Dev: Please have a look at the patch and discuss. I know that this is an enhancement and currently there is feature freeze. Maybe a feature for the next release? 

Examples for supported completion ('|' shows the carret):

org.openide.util.Utilities.acoh| -> actionsForPath
java.lang.System.out| -> setOut
argex| -> IllegalArgumentException
java.util.Collections.que| -> asLifoQueue

TODO: 
* add option in options dialog (or commandline switch/feature toggle)
* improve performance (regex is compiled every time)
* 'better' matching results must be at the top of result list (i guess this is  out of scope of this issue)
Comment 2 markiewb 2012-11-21 21:28:05 UTC
Created attachment 128232 [details]
Patch in action
Comment 3 markiewb 2012-11-22 22:55:05 UTC
Created attachment 128287 [details]
Proposed patch for subword completion v2

Improved patch. Now supports uppercase characters as landmarks.

For example: 'java.lang.System.sIn|' -> 'setIn' will be completed

-----
More info about this feature in eclipse:
* http://code-recommenders.blogspot.de/2011/05/subword-matching-completion-engine-for.html
* http://code-recommenders.blogspot.de/2011/08/eclipse-subwords-completion-1-here-you.html
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=350000
* http://blog.deepakazad.com/2012/05/subwords-completion.html
* http://www.eclipse.org/forums/index.php/t/209269/
Comment 4 markiewb 2012-11-28 20:58:23 UTC
Created attachment 128534 [details]
Proposed patch v3 - with option panel config
Comment 5 markiewb 2012-11-28 21:00:32 UTC
Created attachment 128535 [details]
Patch in action - with option panel config
Comment 6 Dusan Balek 2013-03-26 13:13:12 UTC
Slightly modified patch integrated. Thanks for your contribution!

http://hg.netbeans.org/jet-main/rev/d07bd7b13d60