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.
Summary: | code template fails to expand with code completion popup | ||
---|---|---|---|
Product: | editor | Reporter: | dextml <dextml> |
Component: | Completion & Templates | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | Keywords: | UI, USABILITY |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Windows Vista | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
dextml
2010-01-20 21:13:54 UTC
Making this a defect. IMO the problem is in CC, which (when displayed) handles the TAB key in a special way (tries to complete the common prefix of the offered CC items). However, in this particular case when a code template is offered as well the TAB key should simply mean selecting the template's CC item. Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/fcc6f399e3f1 Integrated into 'main-golden', will be available in build *201011110000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/fcc6f399e3f1 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #179726: code template fails to expand with code completion popup - fixed. Seems to be reappeared in 7.3. Steps to reproduce (in Java project): 1. Type St 2. Popup appears (with StackOverflowError selected). 3. Press <TAB>: instead of completing the template (to String) StackOverflowError is inserted. 3b. If you instead cancel the CC with <ESC> and then press <TAB>, then String is completed. Just checked: 7.1 surely behaved differently and completed to String even with CC popup on and StackOverflowError selected. (Probably a regression by bug 208223 ?) Another test (for keywords): 1. Type sw 2. Press <TAB> Expected: expanded to switch (var) { case val: break; default: throw new AssertionError(); } Actual: expanded to switch (keyword from CC) Interestingly it already had glitches in 7.1, and only worked after expanding first time without CC, but then worked also with CC popup on, until file was closed. Now in 7.3 it is never working with CC popup on. I think, code templates should have the highest priority and completion from CC (even for keywords) should only occur if there are no templates for the typed characters. I can reproduce it in 7.3, but it works fine in dev build |