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 208223

Summary: Code-complete via Tab key
Product: editor Reporter: Geertjan Wielenga <geertjan>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: NumbLock27
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Geertjan Wielenga 2012-02-10 05:40:56 UTC
Currently, when you press the Enter key in the code completion box, the code completion is performed. However, in IntelliJ Idea, the Tab key does the same things as well. I.e., in Idea, both the Enter key and the Tab key are usable in the code completion box.

For Intellij IDEA users, it would be great if the Tab key were to work in the code completion box, in exactly the same way as the Enter key.
Comment 1 Dusan Balek 2012-02-10 09:21:10 UTC
There is a small problem - hitting 'Tab' while code completion is showing inserts common prefix of all displayed completion items - feature of the NB editor from its early days :-(
Comment 2 Geertjan Wielenga 2012-02-10 09:34:17 UTC
Is there a way that in the Idea profile, this could be implemented differently? I.e., in the Idea profile, the Tab key would behave the same as Enter?
Comment 3 Dusan Balek 2012-02-10 09:53:37 UTC
Unfortunately, the current behavior is hardcoded in the code completion infrastructure :-(
Comment 4 Geertjan Wielenga 2012-02-10 09:58:47 UTC
It would be good if all the keyboard shortcuts in the code completion box could be configured by the user in the Options window.
Comment 5 Dusan Balek 2012-02-22 14:51:44 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/7b4644780ee1

Hitting 'Tab' default behavior has been changed: If there is no common prefix to insert, the selected code completion item gets inserted now. (At most 2 hits of 'Tab' are sufficient to insert the selected completion item into a document now).
Comment 6 Quality Engineering 2012-02-24 09:30:40 UTC
Integrated into 'main-golden', will be available in build *201202240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7b4644780ee1
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #208223: Code-complete via Tab key - fixed.
Comment 7 Jiri Prox 2012-03-19 11:01:18 UTC
*** Bug 209667 has been marked as a duplicate of this bug. ***