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 - Patch for: Support subword completion
Summary: Patch for: Support subword completion
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2012-05-12 00:28 UTC by markiewb
Modified: 2013-03-26 13:13 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch for subword completion (1.67 KB, patch)
2012-11-21 21:27 UTC, markiewb
Details | Diff
Patch in action (7.76 KB, image/png)
2012-11-21 21:28 UTC, markiewb
Details
Proposed patch for subword completion v2 (2.04 KB, patch)
2012-11-22 22:55 UTC, markiewb
Details | Diff
Proposed patch v3 - with option panel config (16.80 KB, patch)
2012-11-28 20:58 UTC, markiewb
Details | Diff
Patch in action - with option panel config (32.11 KB, image/png)
2012-11-28 21:00 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
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