1 19 20 package org.netbeans.modules.j2ee.ddloaders.app; 21 22 import java.io.IOException ; 23 import org.openide.filesystems.FileObject; 24 import org.openide.loaders.DataObjectExistsException; 25 import org.openide.loaders.MultiDataObject; 26 import org.openide.loaders.UniFileLoader; 27 import org.openide.util.NbBundle; 28 29 34 public class EarDataLoader extends UniFileLoader { 35 36 private static final long serialVersionUID = 3616780278674213886L; 37 38 39 static final String REQUIRED_MIME_PREFIX_1 = "text/x-dd-application1.4"; 41 private static final String REQUIRED_MIME_PREFIX_2 = "text/x-dd-application5.0"; 43 public EarDataLoader () { 44 super ("org.netbeans.modules.j2ee.ddloaders.app.EarDataObject"); } 46 47 48 protected String defaultDisplayName () { 49 return NbBundle.getMessage (EarDataLoader.class, "LBL_loaderName"); 50 } 51 52 protected String actionsContext() { 53 return "Loaders/text/x-dd/Actions/"; } 55 56 protected void initialize () { 57 super.initialize (); 58 getExtensions().addMimeType(REQUIRED_MIME_PREFIX_1); 59 getExtensions().addMimeType(REQUIRED_MIME_PREFIX_2); 60 } 61 62 protected MultiDataObject createMultiObject (FileObject primaryFile) 63 throws DataObjectExistsException, IOException { 64 return new EarDataObject (primaryFile, this); 65 } 66 67 } 68 | Popular Tags |