1 19 20 package org.netbeans.modules.web.taglib; 21 22 27 28 import java.io.IOException ; 29 30 import org.openide.loaders.UniFileLoader; 31 import org.openide.loaders.ExtensionList; 32 import org.openide.loaders.MultiDataObject; 33 import org.openide.filesystems.FileObject; 34 import org.openide.actions.*; 35 import org.openide.util.actions.SystemAction; 36 import org.openide.util.NbBundle; 37 38 43 44 public final class TLDLoader extends UniFileLoader { 45 46 public static final String tldExt = "tld"; private static final String REQUIRED_MIME_1 = "text/x-tld"; 49 private static final long serialVersionUID = -7367746798495347598L; 50 51 52 public TLDLoader() { 53 super("org.netbeans.modules.web.taglib.TLDDataObject"); } 55 56 58 59 protected void initialize () { 60 super.initialize(); 61 ExtensionList ext = new ExtensionList(); 62 ext.addExtension(tldExt); 63 setExtensions(ext); 64 getExtensions().addMimeType(REQUIRED_MIME_1); 65 } 66 67 protected MultiDataObject createMultiObject(final FileObject fo) 68 throws IOException { 69 MultiDataObject obj = new TLDDataObject(fo, this); 70 return obj; 71 } 72 73 protected String defaultDisplayName () { 74 return NbBundle.getMessage (TLDLoader.class, "TLD_loaderName"); 75 } 76 77 protected String actionsContext() { 78 return "Loaders/text/x-tld/Actions/"; } 80 81 } 82 | Popular Tags |