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 244354

Summary: Tools -> Templates -> Template Manager > Other > SQL file
Product: db Reporter: belaborbely
Component: CodeAssignee: Libor Fischmeistr <lfischmeistr>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: T-SQL function template, I would like to fill

Description belaborbely 2014-05-07 14:04:56 UTC
Created attachment 147163 [details]
T-SQL function template, I would like to fill

I have created a SQL file -template and tried to use parameters's ${name},${user},${date}, but none of these are filled when I try to create a new SQL file.
Comment 1 Martin Entlicher 2015-05-19 13:09:02 UTC
The SQL template does not have SCRIPT_ENGINE_ATTR defined, therefore there is no processing of the template by freemarker.
Comment 2 matthias42 2015-05-20 17:44:42 UTC
belaborbely, thank you for your report. Martin thank you for the pre-analysis.

I enabled freemarker handling on the SQL template file, added some more useful content and made the template usable standalone.

The fix was pushed as:

http://hg.netbeans.org/core-main/rev/bea82b422eff

In the next few days a nightly build will be created that contains the fix. Please see if you find the bug fixed there. If you can verify, please change the bug status to VERIFIED.

As a work-around in netbeans 8, please open the template manager (Tools -> Template Manager), Right click on the sql file template and choose properties, there input "freemarker" into the property editor for "Script Engine".