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 116731 - Layer with url="User.properties" broken
Summary: Layer with url="User.properties" broken
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL: http://deadlock.netbeans.org/hudson/j...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-25 18:05 UTC by Jesse Glick
Modified: 2007-09-26 16:31 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 Jesse Glick 2007-09-25 18:05:46 UTC
use of inline CDATA text contents in <file name="User.properties"> deprecated for performance and charset safety at
jar:file:/hudson/workdir/jobs/trunk/workspace/nbbuild/netbeans/platform7/modules/org-netbeans-modules-favorites.jar!/org/netbeans/modules/favorites/resources/layer.xml:129.
Please use the url attribute instead, or the file attribute originalFile on *.shadow files.


jtulach:

#114625: Reading all files in Templates/Properties as properties and making them available to user
[The file was modified] 	1.19	core/favorites/src/org/netbeans/modules/favorites/Bundle.properties
[The file was added] 	1.1	core/favorites/src/org/netbeans/modules/favorites/templates/PropertiesProvider.java
[The file was modified] 	1.6	core/favorites/src/org/netbeans/modules/favorites/templates/TemplatesAction.java
[The file was modified] 	1.23	core/favorites/src/org/netbeans/modules/favorites/resources/layer.xml
[The file was modified] 	1.16	core/favorites/nbproject/project.xml
[The file was added] 	1.1	core/favorites/src/META-INF/services/org.openide.loaders.CreateFromTemplateAttributesProvider
[The file was added] 	1.1	core/favorites/test/unit/src/org/netbeans/modules/favorites/templates/PropertiesProviderTest.java
Comment 1 Jaroslav Tulach 2007-09-26 07:27:16 UTC
I've already fix the problem, however I am going to convert it into apisupport issue.

Originally I really wanted to use <file url="..."/> but this did not work. The file was always seen as zero length. I 
guess there is a bug in module system or apisupport. Try to add following line into layer.xml

<file name="User.properties/>

go to Important Files/Layer and edit this file, add some content to it and save. A new file next to the layer called 
User.properties is created and the file definition is modified to contain url="...". So far so good.

Start the IDE and you will find that the file length is 0.

The workaround is to make the url point to for example <file url="userprop.txt"/> this seem to work.
Comment 2 Jesse Glick 2007-09-26 16:31:48 UTC
Originally reported issue fixed.

W.r.t. apisupport behavior for structural editing of layer files - it is unreliable generally. Turns out that using
FileSystem to implement this editing was not wise, despise some initial advantages. See duplicates in issue #72541.

If you know of any bug in the module system (independent of apisupport), please file separately. I don't quite follow
what you are talking about in the description here since <file> without 'name' is invalid, and it's not clear what the
relevance of the two names "User.properties" and "userprop.txt" are.