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 251631 - Adding new file to the project from user template
Summary: Adding new file to the project from user template
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Templates (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on: 251625
Blocks:
  Show dependency tree
 
Reported: 2015-04-03 12:05 UTC by mariusz_m
Modified: 2015-04-20 11:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
extension missing (21.39 KB, image/png)
2015-04-03 12:05 UTC, mariusz_m
Details
extension added (26.31 KB, image/png)
2015-04-03 12:06 UTC, mariusz_m
Details
proposed patch (3.35 KB, patch)
2015-04-15 15:35 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mariusz_m 2015-04-03 12:05:19 UTC
This issue is really old and it's occur only when user template file is selected when adding New to the project.

In the field with file name to create the extension is ommited, but in the field on the bottom containing full path the extension is visible. However, the NB creates file without this extension.

If I add missing extension together with filename, the file is created as expected.
Comment 1 mariusz_m 2015-04-03 12:05:57 UTC
Created attachment 153022 [details]
extension missing
Comment 2 mariusz_m 2015-04-03 12:06:27 UTC
Created attachment 153023 [details]
extension added
Comment 3 Alexander Simon 2015-04-15 15:26:48 UTC
It is a common issue:
- new added template does not inherit attributes of sibling temples.
- there is no way to edit template attributes.
Wrong behavior can be reproduced on java:
- add new java template from file.
- add new java file from added template.
- see that second step does not contain "package" field.
Comment 4 Alexander Simon 2015-04-15 15:35:09 UTC
Created attachment 153215 [details]
proposed patch
Comment 5 Martin Entlicher 2015-04-15 15:59:59 UTC
Thanks for the patch. I can apply the part in openide.loaders...
Comment 6 Quality Engineering 2015-04-16 06:35:28 UTC
Integrated into 'main-silver', will be available in build *201504160452* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/dcbe9892bf34
User: Alexander Simon <alexvsimon@netbeans.org>
Log: CND part of partial fix for C/C++ files (bug #251631)
Comment 7 Martin Entlicher 2015-04-16 12:01:52 UTC
Fixed by changeset:   286798:48d3b2c87991
http://hg.netbeans.org/core-main/rev/48d3b2c87991
Comment 8 Quality Engineering 2015-04-20 11:57:11 UTC
Integrated into 'main-silver', will be available in build *201504201004* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/48d3b2c87991
User: mentlicher@netbeans.org
Log: #251631: Retrieve the wizard iterator from the parent folder if it's not defined on the template file.