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 251017

Summary: During "code completion" single TAB key sometimes completes rather than common-prefix
Product: editor Reporter: err <err>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description err 2015-03-08 18:28:14 UTC
Problem on both 8.0.2 and dev
This is a .java file.

NOTE: "case sensitive code completion" is not checked.

To reproduce:
    - in any method enter:
        cla<Ctrl-Space>
    - let the completion options come up
    - enter
        <tab>
    Observe that the result is (| shows the cursor after the space)
        class |
    Expect
        class|
        and the code completion window to stay up

Since NOT case sensitive, should not complete, expect common prefix completion.

It's been a while since I've done a lot of work with NB.
Maybe the fix for Bug 208223 broke things. I find I've been doing a lot more
typing because of what tab does during completion.


BTW, I think Bug 208223 is a big mistake. It's like dumbing down the editor so
that it behaves like IDEA. Have an option maybe, but unconditionally
changing the behavior, causes more typing (at least for me).

Consider
    - enter
        Il<Ctrl-space>
    observe list of several exceptions
    - enter
        <tab>
    observe filling in common prefix

    - note: if <tab> entered again at this point completion finishes
      It could be argued that since the highlighted item shares a common
      prefix that prefix should be completed. Better to do nothing.

    - Consider this one, enter
        Illegal<ctrl-space>
    observe about 6 items,
    - enter
        a
    observe the list goes down to three items. In this case I want one of the
    illegalaccess choices so I quickly
    - enter
        <tab>
    and it completes, even though the highlighted item has a long common
    prefix with the next item. I made a mistake. (I should have entered
    "ac<tab>".)  If nothing had happened it's easily fixed, I can just enter
    the "C", but not so easy if it completes.

I can file this 2nd part about wanting to turn off "<tab>" completion, if
that would be better. Let me know.
Comment 1 Dusan Balek 2015-03-09 11:29:17 UTC
Common prefix completion should respect case sensitivity - fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/72db07b24527

As for the option for switching off the tab completion - please file a new enhancement please.
Comment 2 Quality Engineering 2015-03-13 03:13:33 UTC
Integrated into 'main-silver', will be available in build *201503130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/72db07b24527
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #251017: During "code completion" single TAB key sometimes completes rather than common-prefix - fixed.