1 19 package org.netbeans.modules.xml.core; 20 21 import java.io.IOException ; 22 23 import org.openide.loaders.UniFileLoader; 24 import org.openide.loaders.MultiDataObject; 25 import org.openide.loaders.DataObjectExistsException; 26 import org.openide.loaders.ExtensionList; 27 import org.openide.filesystems.FileObject; 28 import org.openide.actions.*; 29 import org.openide.util.actions.SystemAction; 30 31 import org.netbeans.modules.xml.core.actions.CheckEntityAction; 32 33 40 public final class EntityDataLoader extends UniFileLoader { 41 42 private static final long serialVersionUID = -5201160056633250635L; 43 44 45 private static final String ENT_EXT = "ent"; 47 48 49 public EntityDataLoader() { 50 super ("org.netbeans.modules.xml.core.EntityDataObject"); } 52 53 55 protected void initialize () { 56 super.initialize(); 57 58 ExtensionList ext = getExtensions(); 59 ext.addExtension (ENT_EXT); 60 ext.addMimeType (EntityDataObject.MIME_TYPE); 61 ext.addMimeType ("application/xml-external-parsed-entity"); setExtensions (ext); 63 } 64 65 protected String actionsContext() { 66 return "Loaders/text/xml-external-parsed-entity/Actions/"; 67 } 68 69 72 protected String defaultDisplayName () { 73 return Util.THIS.getString ("PROP_EntityLoader_Name"); 74 } 75 76 81 protected MultiDataObject.Entry createPrimaryEntry (MultiDataObject obj, FileObject primaryFile) { 82 return new XMLDataLoader.XMLFileEntry (obj, primaryFile); } 84 85 93 protected MultiDataObject createMultiObject (FileObject primaryFile) 94 throws DataObjectExistsException, java.io.IOException { 95 return new EntityDataObject (primaryFile, this); 96 } 97 98 } 99 | Popular Tags |