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 175493

Summary: Completion for created code template doesn't work correct
Product: editor Reporter: foboskilla <foboskilla>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description foboskilla 2009-10-27 09:41:58 UTC
Hello,

Few day ago I installed NB 6.8 Beta (for PHP) and found bug related with Code Templates completion and formating.
I use Debian GNU/Linux 'lenny'.

Here is my steps:
1. Go to Tools->Options. Switch Editor section and next choose Code Templates tab.
2. Add new template.
I add template for PHP language. Set abbreviation: dump.
And for Expanded Text I set next ONE LINE:
echo '<pre>'; print_r(${cursor}); exit();
3. Save this template.
4. Go to editor and in .php file I type dump and immediately press TAB button.
Here is results:
echo '<pre>';
print_r(${cursor});
exit();

After each ";" symbol I see a new line. But my template contains only one line! without any line breaks.

Thank you.
Comment 1 Dusan Balek 2009-10-27 11:26:31 UTC
As designed behavior. Each code template is formatted when it is inserted into document to comply with its language
specific formating rules.