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 253836 - Incorrect license for new files
Summary: Incorrect license for new files
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Templates (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-27 07:53 UTC by Tomas Mysik
Modified: 2015-07-30 07:42 UTC (History)
2 users (show)

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 Tomas Mysik 2015-07-27 07:53:40 UTC
In 8.1 Beta, if one works on NB modules and creates a new file, incorrect file license is used. It used to be proper CDDL license but now, the general "no-license" header is used.

It is _really_ annoying to copy proper license from other files every time a new file is created... Could you please look at it? Or does one need to set it anywhere? I tried to look into Project Properties dialog but no license can be set there...

Thanks.

Product Version: NetBeans IDE 8.1 Beta (Build 201507231027)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 3.16.0-44-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Ondrej Vrabec 2015-07-27 15:17:13 UTC
Svato, could you please look at this soon?
templates#CreateFromTemplateImpl "merges" attributes from different providers - in a loop it goes from org.netbeans.modules.templates.AttributeHandlerBridge to org.netbeans.modules.project.uiapi.ProjectTemplateAttributesProvider.
But while AttributeHandlerBridge correctly provides project.license=CDDL, ProjectTemplateAttributesProvider returns DEFAULT:no-license. Sadly the values from the second provider overwrite the values got from the first one.
CreateFromTemplateImpl probably needs a better way of merging the attributes.
Comment 2 Svata Dedic 2015-07-28 09:46:57 UTC
should be fixed by jet-main#cb6006eaaa2c
Comment 3 Quality Engineering 2015-07-29 01:30:53 UTC
Integrated into 'main-silver', will be available in build *201507290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/cb6006eaaa2c
User: Svata Dedic <sdedic@netbeans.org>
Log: #253836: improved interaction between legacy and new project template attribute providers
Comment 4 Tomas Mysik 2015-07-30 06:17:43 UTC
Verified, thanks.

BTW perhaps it is too late but this issue is a stopper for using Beta for me ;)

Product Version: NetBeans IDE Dev (Build web-main-2613-on-20150730)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 3.16.0-45-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 5 Ondrej Vrabec 2015-07-30 07:10:29 UTC
fixed in beta: releases #85c99d49affb
Comment 6 Tomas Mysik 2015-07-30 07:25:59 UTC
Not sure if it can be related or not to this issue - I just created a new PHP file and instead of license (the "no license" header), I see this:

Expression project.licensePath is undefined on line 5, column 14 in Templates/Scripting/EmptyPHP.php.

Sváťo, could it be related to this issue?

Ondro, not sure about the Beta transplant - should not we rollback it for now? Sorry for inconveniences...

Thanks.
Comment 7 Tomas Mysik 2015-07-30 07:32:42 UTC
(In reply to Tomas Mysik from comment #6)
> Expression project.licensePath is undefined on line 5, column 14 in
> Templates/Scripting/EmptyPHP.php.

The same happens to me for HTML and XML file so it could be related.

Thanks.
Comment 8 Ondrej Vrabec 2015-07-30 07:42:58 UTC
causes other problem: #253968
rollbacked: #ff4888421a7f