1 19 20 package org.netbeans.modules.web.struts; 21 22 import java.io.IOException ; 23 24 import org.openide.actions.*; 25 import org.openide.filesystems.*; 26 import org.openide.loaders.*; 27 import org.openide.util.NbBundle; 28 import org.openide.util.actions.SystemAction; 29 31 35 public class StrutsConfigLoader extends UniFileLoader { 36 private static final String REQUIRED_MIME = "text/x-struts+xml"; public StrutsConfigLoader() { 38 this("org.netbeans.modules.web.struts.StrutsConfigLoader"); 39 } 40 41 protected StrutsConfigLoader(String recognizedObjectClass) { 43 super(recognizedObjectClass); 44 } 45 46 protected String defaultDisplayName() { 47 return NbBundle.getMessage(StrutsConfigLoader.class, "LBL_loaderName"); 48 } 49 50 protected void initialize() { 51 super.initialize(); 52 getExtensions().addMimeType(REQUIRED_MIME); 53 } 54 55 protected String actionsContext() { 56 return "Loaders/text/x-struts+xml/Actions/"; } 58 59 protected MultiDataObject createMultiObject(FileObject primaryFile) 60 throws DataObjectExistsException, IOException { 61 return new StrutsConfigDataObject(primaryFile, this); 62 } 63 } | Popular Tags |