1 19 20 package org.netbeans.modules.scripting.php.webproject; 21 22 import java.io.IOException ; 23 import org.openide.filesystems.FileObject; 24 import org.openide.loaders.DataObjectExistsException; 25 import org.openide.loaders.MultiDataObject; 26 import org.openide.loaders.UniFileLoader; 27 import org.openide.util.NbBundle; 28 29 public class PhpSourceDataLoader extends UniFileLoader { 30 31 public static final String REQUIRED_MIME = "application/x-php"; 32 33 private static final long serialVersionUID = 1L; 34 35 public PhpSourceDataLoader() { 36 super("org.netbeans.modules.scripting.php.webproject.PhpSourceDataObject"); 37 } 38 39 protected String defaultDisplayName() { 40 return NbBundle.getMessage(PhpSourceDataLoader.class, "LBL_PhpSource_loader_name"); 41 } 42 43 protected void initialize() { 44 super.initialize(); 45 getExtensions().addMimeType(REQUIRED_MIME); 46 } 47 48 protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException { 49 return new PhpSourceDataObject(primaryFile, this); 50 } 51 52 protected String actionsContext() { 53 return "Loaders/" + REQUIRED_MIME + "/Actions"; 54 } 55 56 } 57 | Popular Tags |