1 19 20 package org.netbeans.modules.db.sql.editor; 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 layerFs = new XMLFileSystem(RepositoryImpl.class.getClassLoader().getResource("org/netbeans/modules/db/resources/mf-layer.xml")); 49 return new MultiFileSystem(new FileSystem[] { writeFs, layerFs }); 50 } catch (SAXException e) { 51 return null; 52 } 53 } 54 } 55 | Popular Tags |