1 19 package org.netbeans.modules.xml.core; 20 21 import java.io.IOException ; 22 23 import org.openide.loaders.*; 24 import org.openide.filesystems.FileObject; 25 import org.openide.filesystems.FileUtil; 26 import org.openide.actions.*; 27 import org.openide.util.actions.SystemAction; 28 import org.openide.util.*; 29 30 import org.netbeans.modules.xml.core.actions.CollectDTDAction; 31 import org.netbeans.modules.xml.core.actions.XMLUpdateDocumentAction; 32 33 39 public final class DTDDataLoader extends UniFileLoader { 40 41 42 private static final long serialVersionUID = 1954391380343387000L; 43 44 45 private static final String DTD_EXT = "dtd"; private static final String MOD_EXT = "mod"; 48 49 public DTDDataLoader() { 50 super ("org.netbeans.modules.xml.core.DTDDataObject"); } 52 53 55 protected void initialize () { 56 super.initialize(); 57 58 ExtensionList ext = getExtensions(); 59 ext.addExtension (DTD_EXT); 60 ext.addExtension (MOD_EXT); 61 ext.addMimeType (DTDDataObject.MIME_TYPE); 62 ext.addMimeType ("text/x-dtd"); setExtensions (ext); 64 } 65 66 protected String actionsContext() { 67 return "Loaders/text/x-dtd/Actions/"; 68 } 69 70 73 protected String defaultDisplayName () { 74 return Util.THIS.getString ("PROP_DtdLoader_Name"); 75 } 76 77 78 83 protected MultiDataObject.Entry createPrimaryEntry (MultiDataObject obj, FileObject primaryFile) { 84 return new XMLDataLoader.XMLFileEntry (obj, primaryFile); } 86 87 95 protected MultiDataObject createMultiObject (FileObject primaryFile) 96 throws DataObjectExistsException, java.io.IOException { 97 return new DTDDataObject (primaryFile, this); 98 } 99 } 100 | Popular Tags |