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 144201 - [65cat] Smarter code templates expansion
Summary: [65cat] Smarter code templates expansion
Status: RESOLVED DUPLICATE of bug 151633
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-17 10:43 UTC by saeed_z_f
Modified: 2011-09-19 20:55 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description saeed_z_f 2008-08-17 10:43:22 UTC
[ BUILD # : 200808141419 ]
[ JDK VERSION : 1.6.0_02 ]

Hi

When i want to use Code Template in editor it work truly but when i
type abbreviation of Code Template in editor and then press Enter
button then i return in the previous line and then press Tab button
for using code template that i typed . it does not work and show
anything.
Comment 1 Petr Dvorak 2008-08-18 12:31:13 UTC
Well, I believe this is the way it is designed.

For example: If you type "for " (with a space) and then you realize you can actually use a template "fori<tab>", you
need to delete all "for " and start over. If you just delete the last space and if you press <tab>, it won't work...

I think this issue is probably invalid. What if you want to type "int fori<tab>= 0;", for example because of the nice
indentation? You must leave the user some means to do that... If the code template was expanded everytime you press tab
after template code, you wouldn't be able to type above mentioned text...

I am making this issue "invalid" for now, but please don't hesitate to reopen this issue if you think it should be opened...
Comment 2 saeed_z_f 2008-08-18 15:51:13 UTC
Hi 

I think when a user change the short key of code template to shift + space this is a problem and this is not the way it
is designed .
Comment 3 Jiri Prox 2008-08-19 15:59:49 UTC
this is not so serious IMHO
Comment 4 Vitezslav Stejskal 2008-08-20 09:20:29 UTC
Well, in fact this __is__ the way how code templates expansion was designed. The question is whether this design is good
or not. Maybe it is not and maybe the expansion could behave differently depending on what expansion key you choose. But
any change in this area may have potentially disastrous consequences for many people who has already become familiar
with the way how it is now. 
Comment 5 Vitezslav Stejskal 2008-10-29 13:02:57 UTC

*** This issue has been marked as a duplicate of 57856 ***
Comment 6 ceklock 2011-09-19 20:55:00 UTC

*** This bug has been marked as a duplicate of bug 151633 ***