java left logo
java middle logo
java right logo
 

Home arrow Other API Tips arrow NetBeans arrow What are .shadow files
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 3947
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
What are .shadow files E-mail
User Rating: / 3
PoorBest 

.shadow files are mainly used in the System Filesystem for configuration data. They are the functional equivalent of Unix symbolic links - a .shadow file is a pointer to another file whose behavior in every respect except its path and file name is the same as the original.

.shadow files are commonly used where only a single instance of an object is needed, but it must exist in multiple folders. For example, an Action is typically declared in the Actions/ folder of the System Filesystem. But the action also needs to appear in menus and toolbars, possibly other places. So, rather than create multiple instances of an action, one .instance file is created in the module's layer file, in the Actions/ folder. Then .shadow files are created in all of the other places the .instance file would be needed, pointing to the .instance file.

Declaring a .shadow file in the system filesystem looks like this:

     <folder name="A">
        <file name="com-foo-mymodule-MyClass.instance"/>
     </folder>

     <folder name="B">
        <file name="Shadow1.shadow">
            <attr name="originalFile" 
               stringvalue="A/com-foo-mymodule-MyClass.instance"/>
        </file>
     </folder>

     <folder name="C">
        <file name="anotherShadow.shadow">
            <attr name="originalFile" 
               stringvalue="A/com-foo-mymodule-MyClass.instance"/>
        </file>
     </folder>

.shadow files can point to either files in the system filesystem, or real files on disk. For example, the Favorites tab in the NetBeans IDE uses .shadow files to link to real directories on disk.

Source: NetBeans FAQ


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.