Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 237897 - Code template applies also after code completion
Code template applies also after code completion
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Completion & Templates
7.4
PC Mac OS X
: P3 with 1 vote (vote)
: 8.1
Assigned To: Dusan Balek
issues@editor
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


Attachments

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:
SETUP:
- 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

SIMULATION:
- 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.


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