1 19 20 package org.netbeans.modules.j2ee.sun.ide.sunresources.resourcesloader; 21 22 import java.io.IOException ; 23 import org.openide.filesystems.FileObject; 24 import org.openide.loaders.DataObjectExistsException; 25 import org.openide.loaders.ExtensionList; 26 import org.openide.loaders.MultiDataObject; 27 import org.openide.loaders.UniFileLoader; 28 import org.openide.util.NbBundle; 29 30 34 public class SunResourceDataLoader extends UniFileLoader { 35 36 private static final long serialVersionUID = 1L; 37 38 public SunResourceDataLoader() { 39 this("org.netbeans.modules.j2ee.sun.ide.sunresources.resourcesloader.SunResourceDataObject"); } 41 42 protected SunResourceDataLoader(String recognizedObjectClass) { 44 super(recognizedObjectClass); 45 } 46 47 protected String defaultDisplayName() { 48 return NbBundle.getMessage(SunResourceDataLoader.class, "LBL_loaderName"); } 50 51 protected void initialize() { 52 super.initialize(); 53 54 ExtensionList extensions = new ExtensionList(); 55 extensions.addExtension("sun-resource"); setExtensions(extensions); 57 } 58 59 protected String actionsContext () { 60 return "Loaders/xml/sun-resource/Actions/"; } 62 63 protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException { 64 return new SunResourceDataObject(primaryFile, this); 65 } 66 67 } 68 | Popular Tags |