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 - Allow "_hidden" tag also in other filesystems than layer.xml
Summary: Allow "_hidden" tag also in other filesystems than layer.xml
Status: RESOLVED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks: 26338
  Show dependency tree
 
Reported: 2008-01-09 00:39 UTC by feldari
Modified: 2008-12-22 10:03 UTC (History)
1 user (show)

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 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.