1 19 20 package org.netbeans.modules.web.project.test; 21 22 import org.openide.filesystems.FileSystem; 23 import org.openide.filesystems.FileUtil; 24 import org.openide.filesystems.MultiFileSystem; 25 import org.openide.filesystems.Repository; 26 import org.openide.filesystems.XMLFileSystem; 27 import org.xml.sax.SAXException ; 28 29 36 public class RepositoryImpl extends Repository { 37 38 private XMLFileSystem system; 39 40 public RepositoryImpl() { 41 super(createDefFs()); 42 } 43 44 private static FileSystem createDefFs() { 45 try 46 { 47 FileSystem writeFs = FileUtil.createMemoryFileSystem(); 48 FileSystem layerWebProject = new XMLFileSystem(RepositoryImpl.class.getClassLoader().getResource("org/netbeans/modules/j2ee/deployment/impl/layer.xml")); 49 return new MultiFileSystem(new FileSystem[] {writeFs, layerWebProject}); 50 } catch (SAXException e) { 51 AssertionError ae = new AssertionError (e.getMessage()); 52 ae.initCause(e); 53 throw ae; 54 } 55 } 56 57 } 58 | Popular Tags |