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 62004 - Superfluous instanceClass attrs added to folder
Summary: Superfluous instanceClass attrs added to folder
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-09 21:23 UTC by Jesse Glick
Modified: 2005-11-29 13:23 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 2005-08-09 21:23:41 UTC
Made a new module, then added a loader to it (XML subtype). On load, got on console

[org.netbeans.core.projects.cache #2] Warning: layer
jar:file:/tmp/module1/build/cluster/modules/org-yourorghere-module1.jar!/org/yourorghere/module1/layer.xml
contains duplicate attributes instanceClass for Loaders/text/x-stuff+xml/Actions
[org.netbeans.core.projects.cache #2] Warning: layer
jar:file:/tmp/module1/build/cluster/modules/org-yourorghere-module1.jar!/org/yourorghere/module1/layer.xml
contains duplicate attributes instanceClass for Loaders/text/x-stuff+xml/Actions
[org.netbeans.core.projects.cache #2] Warning: layer
jar:file:/tmp/module1/build/cluster/modules/org-yourorghere-module1.jar!/org/yourorghere/module1/layer.xml
contains duplicate attributes instanceClass for Loaders/text/x-stuff+xml/Actions
[org.netbeans.core.projects.cache #2] Warning: use of inline CDATA text contents
in <file name="newStuff.xml"> deprecated for performance and charset safety at
jar:file:/tmp/module1/build/cluster/modules/org-yourorghere-module1.jar!/org/yourorghere/module1/layer.xml:59.
Please use the 'url' attribute instead, or the file attribute 'originalFile' on
*.shadow files (with IDE/1 > 2.23).

(The last should be self-explanatory.) The first three are because the layer has

<file name="org-openide-actions-OpenAction.instance"/>
<attr boolvalue="true"
name="org-openide-actions-OpenAction.instance/org-openide-actions-FileSystemAction.instance"/>
<file name="org-openide-actions-FileSystemAction.instance"/>
<attr boolvalue="true"
name="org-openide-actions-FileSystemAction.instance/sep-1.instance"/>
<file name="sep-1.instance">
    <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
</file>
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr boolvalue="true"
name="sep-1.instance/org-openide-actions-CutAction.instance"/>
<file name="org-openide-actions-CutAction.instance"/>
<attr boolvalue="true"
name="org-openide-actions-CutAction.instance/org-openide-actions-CopyAction.instance"/>
<file name="org-openide-actions-CopyAction.instance"/>
<attr boolvalue="true"
name="org-openide-actions-CopyAction.instance/sep-2.instance"/>
<file name="sep-2.instance">
    <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
</file>
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr boolvalue="true"
name="sep-2.instance/org-openide-actions-DeleteAction.instance"/>
<file name="org-openide-actions-DeleteAction.instance"/>
<attr boolvalue="true"
name="org-openide-actions-DeleteAction.instance/org-openide-actions-RenameAction.instance"/>
<file name="org-openide-actions-RenameAction.instance"/>
<attr boolvalue="true"
name="org-openide-actions-RenameAction.instance/sep-3.instance"/>
<file name="sep-3.instance">
    <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
</file>
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr boolvalue="true"
name="sep-3.instance/org-openide-actions-SaveAsTemplateAction.instance"/>
<file name="org-openide-actions-SaveAsTemplateAction.instance"/>
<attr boolvalue="true"
name="org-openide-actions-SaveAsTemplateAction.instance/sep-4.instance"/>
<file name="sep-4.instance">
    <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
</file>
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr boolvalue="true"
name="sep-4.instance/org-openide-actions-ToolsAction.instance"/>
<file name="org-openide-actions-ToolsAction.instance"/>
<attr boolvalue="true"
name="org-openide-actions-ToolsAction.instance/org-openide-actions-PropertiesAction.instance"/>
<file name="org-openide-actions-PropertiesAction.instance"/>

Note the three occurrences of

<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>

directly beneath the folder, which are incorrect.
Comment 1 Jesse Glick 2005-08-09 21:24:27 UTC
I meant four occurrences, actually.
Comment 2 Milos Kleint 2005-08-10 10:20:59 UTC
fixed. the cause was the recursive nature of some DOM apis. ;(
Comment 3 Jesse Glick 2005-08-10 18:07:59 UTC
Yes, be careful with getElementsBy* - doesn't do what you probably expect it to...
Comment 4 Milos Kleint 2005-08-11 07:58:55 UTC
i wonder how jdom stands towards dom performance wise. it's apis look and feel
better, at least to me.
Comment 5 Jesse Glick 2005-08-11 16:21:17 UTC
JDOM is indeed much more pleasant to use, but good luck getting approval to
bundle it now. Anyway I am already working on a completely different mechanism
for modifying layer files so please spend minimal time on it.
Comment 6 pzajac 2005-11-29 13:23:45 UTC
verified