Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 251017 - During "code completion" single TAB key sometimes completes rather than common-prefix
During "code completion" single TAB key sometimes completes rather than commo...
Status: VERIFIED FIXED
Product: editor
Classification: Unclassified
Component: Completion & Templates
8.1
PC Windows 7
: P3 (vote)
: 8.1
Assigned To: Dusan Balek
issues@editor
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-08 18:28 UTC by err
Modified: 2015-04-01 13:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo