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 237897 - Code template applies also after code completion
Summary: Code template applies also after code completion
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
Depends on:
Reported: 2013-11-01 15:24 UTC by martin.mares
Modified: 2015-03-12 09:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description martin.mares 2013-11-01 15:24:50 UTC
I am strong user of code template feature. I map this feature to <SPACE> from the first version with this feature. I update Netbeans regularly and followed problem comes with version 7.4.
I understand that code template on <SPACE> is not default but still possible. I will be very happy if you fix followed bug.

How to reproduce:
- Properties / Editor / Code Templates: Choose Expand template on SPACE
- Be sure that there is followed template in the list:
Abbreviation: le
Expanded text: ${no-indent}length

- Open / create any java class.
- Place followed code into any method body:
    String str = "str";
    if (str.
- write: le<ctrl+space>
- choose: length() - It can be choose automatically because it is only one possibility for le
- Your code looks like
    String str = "str";
    if (str.length()
- Write <space> (Because you want to continue with something like ==, ...)
- And your code looks now like:
    String str = "str";
    if (str.lengthlength
- It is because code template was applied even after code completion. And I feel that this is wrong behavior.
Comment 1 Dusan Balek 2015-03-12 09:20:53 UTC
Already fixed in the current dev build.