1 19 20 package org.netbeans.modules.j2ee.ddloaders.web; 21 22 import java.io.IOException ; 23 24 import org.openide.actions.*; 25 import org.openide.filesystems.FileObject; 26 import org.openide.loaders.UniFileLoader; 27 import org.openide.loaders.MultiDataObject; 28 import org.openide.loaders.DataObjectExistsException; 29 import org.openide.util.actions.SystemAction; 30 import org.openide.util.NbBundle; 31 32 36 public class DDDataLoader extends UniFileLoader { 37 38 private static final long serialVersionUID = 8616780278674213886L; 39 private static final String REQUIRED_MIME_1 = "text/x-dd-servlet2.4"; private static final String REQUIRED_MIME_2 = "text/x-dd-servlet2.3"; private static final String REQUIRED_MIME_3 = "text/x-dd-servlet2.2"; private static final String REQUIRED_MIME_4 = "text/x-dd-servlet2.5"; 44 public DDDataLoader () { 45 super ("org.netbeans.modules.j2ee.ddloaders.web.DDDataObject"); } 47 48 protected void initialize () { 49 super.initialize (); 50 getExtensions().addMimeType(REQUIRED_MIME_1); 51 getExtensions().addMimeType(REQUIRED_MIME_2); 52 getExtensions().addMimeType(REQUIRED_MIME_3); 53 getExtensions().addMimeType(REQUIRED_MIME_4); 54 } 55 56 protected String defaultDisplayName () { 57 return NbBundle.getMessage (DDDataLoader.class, "LBL_loaderName"); 58 } 59 60 protected String actionsContext() { 61 return "Loaders/text/x-dd/Actions/"; } 63 64 protected MultiDataObject createMultiObject (FileObject primaryFile) 65 throws DataObjectExistsException, IOException { 66 67 return new DDDataObject (primaryFile, this); 68 } 69 70 } 71 | Popular Tags |