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 124927

Summary: Allow "_hidden" tag also in other filesystems than layer.xml
Product: platform Reporter: feldari <feldari>
Component: FilesystemsAssignee: rmatous <rmatous>
Status: RESOLVED INVALID    
Severity: blocker CC: jtulach
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 26338    

Description feldari 2008-01-09 00:39:21 UTC
At the moment it is not possible to use the "_hidden" tag in filesystems other than layer.xml.

Example:
Provide following filesystem to the system filesystem via META-INF/services/org.openide.filesystems.FileSystem

public class LoginFileSystem extends MultiFileSystem {
    public LoginFileSystem() {
        try {
            FileSystem memfs = FileUtil.createMemoryFileSystem();
           	memfs.getRoot().createFolder("Menu").createFolder("File_hidden");
            this.setDelegates(memfs);
            System.out.println("Debugging message");
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
}

This doesn't hide the file menu, but for consistency of filesystems it should (filesystem in layer.xml and user
directory do hide it).
Comment 1 Jaroslav Tulach 2008-01-09 23:17:14 UTC
Imho this works, see core/**/SystemFileSystemTest.java and 
testPreferenceOfLayersNowDynamicSystemsCanHideWhatComesFromLayers method.

Probably use this.setPropagateMasks(true) or something like that.
Comment 2 feldari 2008-01-10 03:09:35 UTC
I confirm that your suggestion works.
setPropagateMasks(true) solves the problem.
Thanks a lot.