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