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 192724 - TAB does not work after code completion window is invoked
Summary: TAB does not work after code completion window is invoked
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 04:35 UTC by Masaki Katakai
Modified: 2010-12-02 06:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2010-12-01 04:35:26 UTC
NetBeans IDE 7.0 Beta (Build 201011142133)
Java: 1.7.0-ea; Java HotSpot(TM) Client VM 20.0-b01
Windows XP 5.1; MS932; ja_JP (nb)
I tried 7.0 Beta but it happens on 6.9.1 too.

I'm not sure if it's expected behavior not, I got the question from community.
Please clarify.

1. Create a Java project
2. Edit a java file
3. Type "for" and CTRL+SPACE
    code templates around "for*" are listed on popup.
    "forc", "forst", "fore", "fori", "forl", "forv".
4. type "c", now "forc" on editor but
    Editor says "No Suggestions".
    "forc" is defined in code template
5. hit TAB key
    but it does not expand to code template

When I type "forc" (without CTRL+SPACE) then hit TAB, it expands to code template.

Is this correct behavior?
Comment 1 Dusan Balek 2010-12-01 09:43:22 UTC
ad 4) Items displayed in the code completion list are filtered by an expanded text prefix (not by an abbreviation prefix) - that is why the 'No Suggestions' appears after 'forc' is typed in Editor.

ad 5) Code templates cannot be expanded while the code completion is visible because the TAB key is consumed by the code completion infrastructure to 'insert common prefix'.

However, after user hides the code completion window (e.g. by pressing Esc), pressing TAB key should expand template again. This should be fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/321f0c2d0201
Comment 2 Masaki Katakai 2010-12-01 13:34:39 UTC
(In reply to comment #1)
> However, after user hides the code completion window (e.g. by pressing Esc),
> pressing TAB key should expand template again. This should be fixed in
> jet-main.

Yes, I wanted to say step 5) is performed after popup is closed.

Great! Thank you for fixing quickly!
Comment 3 Quality Engineering 2010-12-02 06:24:15 UTC
Integrated into 'main-golden', will be available in build *201012020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/321f0c2d0201
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #192724: TAB does not work after code completion window is invoked - fixed.