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 241789 - Modifying template from the template Manager Editor does not work.
Summary: Modifying template from the template Manager Editor does not work.
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Templates (show other bugs)
Version: 7.3
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-13 04:46 UTC by Erikku
Modified: 2014-06-27 13:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erikku 2014-02-13 04:46:04 UTC
Go to:
Tools -> Templates
It opens the Template Manager.
Select:
HTML/Javascript -> Javascript File
Then:
Open in Editor

The file looks like this:
<#-- This is a FreeMarker template -->
<#-- You can change the contents of the license inserted into
 #   each template by opening Tools | Templates and editing
 #   Licenses | Default License  -->
<#assign licenseFirst = "/* ">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">

Whatever modification I tried, whenever I create a new Javascript file from:
New -> Javascript File
it always look like this.
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

It does the same thing with the other files I tried to modify.

It works if I create a new template though.

--------------------------------------------------------------------------------

Another (minor) issue:
Tools -> Templates
Open the Template Manager.
Select:
HTML/Javascript -> Javascript File
Then:
Diplicate
The Rename Template box opens, but when you click on the box to edit the names, you do not get access to the edit box and cannot edit anything.
BUT, if I leave that Rename Template box open and go to an another application (outside Netbeans, for example I click on my desktop or my web browser) and go back to Netbeans, then I can edit those names.
Comment 1 Martin Entlicher 2014-06-27 13:43:57 UTC
The initial file content is in fact a combination of license and template.
In 8.0 the header text was changed to to following to reflect that:
"To change this license header, choose License Headers in Project Properties.
 To change this template file, choose Tools | Templates
 and open the template in the editor."

Thus go to Tools -> Templates, select Licenses -> Default License and edit.
Or select the desired license in the project properties.

The problem with the rename dialog looks like some strange Java issue, I think that it's out of control for NetBeans.