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 240834 - Shadow Files not working on layer.xml (Dont work NB 7.4, works on NB 7.2.1)
Summary: Shadow Files not working on layer.xml (Dont work NB 7.4, works on NB 7.2.1)
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.4
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL: http://www.weg.net
Keywords:
Depends on: 214664
Blocks:
  Show dependency tree
 
Reported: 2014-01-22 18:20 UTC by sonnenhohl
Modified: 2014-01-24 17:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
application-nb74 (271.10 KB, image/png)
2014-01-23 16:08 UTC, sonnenhohl
Details
application-nb721-working (291.18 KB, image/png)
2014-01-23 16:08 UTC, sonnenhohl
Details
creating-palette-code (290.57 KB, image/png)
2014-01-23 16:09 UTC, sonnenhohl
Details
layer-nb74 (164.61 KB, text/xml)
2014-01-23 16:09 UTC, sonnenhohl
Details
layer-nb721-working (164.11 KB, text/xml)
2014-01-23 16:09 UTC, sonnenhohl
Details
layerxml-nb74 (358.76 KB, image/png)
2014-01-23 16:10 UTC, sonnenhohl
Details
layerxml-nb721-working (293.63 KB, image/png)
2014-01-23 16:11 UTC, sonnenhohl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sonnenhohl 2014-01-22 18:20:45 UTC
In the version 7.2.1 our code was running fine, after updating to 7.4 the shadow files stopped working.

In our layer xml we have the following Shadow File by example:

<folder name="Conversion to BCD.shadow">
<attr name="originalFile" stringvalue="Device/PLC300/Firmware/120/FunctionBlocks/Program/Conversion to BCD"/>
</folder>

Any possible solution? If i coulnd fix that i will need to return to 7.2.1.

Thanks
Comment 1 Jaroslav Havlin 2014-01-23 11:53:49 UTC
Please, what exactly does not work?

> <folder name="Conversion to BCD.shadow"> [...]
I tried to create this shadow file, and it worked correctly (at least DataShadow.findOriginal(shadowFile)).

Data shadows are used quite intensively in the IDE, so if there were some serious bug, it would be probably discovered very quickly. I'm decreasing the priority for now.

Please, provide a test case, or detailed explanation of the problem, or preferably both. Thank you.
Comment 2 sonnenhohl 2014-01-23 16:07:18 UTC
Lets go in details:

I have take screenshots of all that doesn´t work. 

1. Comparing the files layerxml-nb721-working.png and layerxml-nb74.png you will see that the layer.xml shadown files are not loading on NB 7.4 but are loading on NB 7.2.1, the layer.xml files are the same. (Both xml files are also attached)

2. Comparing the files application-nb74.png and application-nb721-working.png you will see that the palette on my application is not loading on the platform 7.4 but its loading on 7.2.1. On the creation of the palete we use the default constructor of the platform, same code on 7.4 and 7.2.1 see the image creating-palette-code.png

Please inform if you need more info.
Comment 3 sonnenhohl 2014-01-23 16:08:13 UTC
Created attachment 144304 [details]
application-nb74
Comment 4 sonnenhohl 2014-01-23 16:08:58 UTC
Created attachment 144305 [details]
application-nb721-working
Comment 5 sonnenhohl 2014-01-23 16:09:04 UTC
Created attachment 144306 [details]
creating-palette-code
Comment 6 sonnenhohl 2014-01-23 16:09:27 UTC
Created attachment 144307 [details]
layer-nb74
Comment 7 sonnenhohl 2014-01-23 16:09:55 UTC
Created attachment 144308 [details]
layer-nb721-working
Comment 8 sonnenhohl 2014-01-23 16:10:35 UTC
Created attachment 144309 [details]
layerxml-nb74
Comment 9 sonnenhohl 2014-01-23 16:11:29 UTC
Created attachment 144310 [details]
layerxml-nb721-working
Comment 10 Jaroslav Havlin 2014-01-24 09:44:14 UTC
Please, try to start NetBeans (or your platform application) with this command line argument:
-J-Dorg.openide.loaders.FolderChildren.delayedCreation=false

Does it help?

(Many thanks to Ondrej Vrabec for help with evaluation.)
Comment 11 sonnenhohl 2014-01-24 11:50:43 UTC
Hello Jaroslav,

Same problem.
Comment 12 Ondrej Vrabec 2014-01-24 15:42:24 UTC
This seems to be a result of a fix of bug #214664. Shadow *files* are recognized only as *files* not folders (the fact that it worked with <folder></folder> was merely a bug). And because your shadow layer entries are folder (not files) they stopped working correctly. Rewrite your layer shadows to <file></file> and they'll start working again. For more information see https://netbeans.org/bugzilla/show_bug.cgi?id=214664.
Comment 13 sonnenhohl 2014-01-24 15:51:26 UTC
I will try this solution and post results.

But if you look into the schema http://www.netbeans.org/dtds/filesystem-1_2.dtd , you will find the folder there.

<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">

<!-- -//NetBeans//DTD Filesystem 1.2//EN -->
<!-- XML representation of a fixed filesystem -->
<!-- as for example a module layer. -->
<!-- See: org.openide.filesystems.XMLFileSystem -->
<!ELEMENT filesystem   (file|folder|attr)*      >
<!ELEMENT folder       (folder|file|attr)*   >
<!ELEMENT file         (#PCDATA|attr)*>
<!ELEMENT attr    EMPTY               >
<!ATTLIST filesystem                       >
<!ATTLIST folder
          name         CDATA #REQUIRED     >
<!ATTLIST file
          name         CDATA #REQUIRED
          url          CDATA #IMPLIED      >
<!ATTLIST attr
          name         CDATA #REQUIRED
          bytevalue    CDATA #IMPLIED
          shortvalue   CDATA #IMPLIED
          intvalue     CDATA #IMPLIED
          longvalue    CDATA #IMPLIED
          floatvalue   CDATA #IMPLIED
          doublevalue  CDATA #IMPLIED
          boolvalue    CDATA #IMPLIED
          charvalue    CDATA #IMPLIED
          stringvalue  CDATA #IMPLIED
          urlvalue     CDATA #IMPLIED
          methodvalue  CDATA #IMPLIED
          newvalue     CDATA #IMPLIED
          serialvalue  CDATA #IMPLIED
          bundlevalue  CDATA #IMPLIED      >
Comment 14 sonnenhohl 2014-01-24 17:48:30 UTC
Its working now. 

The only difference i see its that on the tree of layer.xml when i use the tag <file> on a folder,  i can´t expand them. But that is not a big issue.

Thanks for your help.