1 19 20 package org.netbeans.modules.java; 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 33 public final class ClassDataLoader extends UniFileLoader { 34 35 36 public static final String CLASS_EXTENSION = "class"; 38 protected ClassDataLoader() { 39 super("org.netbeans.modules.java.ClassDataObject"); getExtensions().addExtension(CLASS_EXTENSION); 41 } 42 43 44 protected MultiDataObject createMultiObject(FileObject primaryFile) 45 throws DataObjectExistsException, IOException { 46 47 if (primaryFile.getExt().equals(CLASS_EXTENSION)) { 48 return new ClassDataObject(primaryFile, this); 49 } 50 return null; 51 } 52 53 protected String defaultDisplayName() { 54 return NbBundle.getMessage(ClassDataLoader.class, 55 "PROP_ClassLoader_Name"); } 57 58 } 59 | Popular Tags |