1 19 20 21 package org.netbeans.modules.group; 22 23 24 import org.openide.actions.*; 25 import org.openide.filesystems.*; 26 import org.openide.loaders.*; 27 import org.openide.util.actions.SystemAction; 28 import org.openide.util.NbBundle; 29 30 31 36 public class GroupShadowLoader extends DataLoader { 37 38 39 static final long serialVersionUID =-2768192459953761627L; 40 41 48 public static final String GS_EXTENSION = "group"; 50 55 private ExtensionList extensions; 56 57 58 59 public GroupShadowLoader() { 60 super("org.netbeans.modules.group.GroupShadow"); 62 extensions = new ExtensionList(); 63 extensions.addExtension(GS_EXTENSION); 64 } 65 66 67 68 protected String defaultDisplayName() { 69 return NbBundle.getMessage(GroupShadowLoader.class, 70 "PROP_GroupShadowName"); } 72 73 74 protected SystemAction[] defaultActions() { 75 return new SystemAction[] { 76 SystemAction.get(OpenLocalExplorerAction.class), 77 SystemAction.get(FileSystemAction.class), 78 null, 79 SystemAction.get(CutAction.class), 80 SystemAction.get(CopyAction.class), 81 SystemAction.get(PasteAction.class), 82 null, 83 SystemAction.get(DeleteAction.class), 84 SystemAction.get(RenameAction.class), 85 null, 86 SystemAction.get(SaveAsTemplateAction.class), 87 null, 88 SystemAction.get(ToolsAction.class), 89 SystemAction.get(PropertiesAction.class) 90 }; 91 } 92 93 94 100 protected DataObject handleFindDataObject( 101 FileObject fo, 102 DataLoader.RecognizedFiles recognized) throws java.io.IOException { 103 if (getExtensions().isRegistered(fo)) { 104 return new GroupShadow(fo, this); 105 } 106 return null; 107 } 108 109 116 public ExtensionList getExtensions() { 117 return extensions; 118 } 119 120 127 public void setExtensions(ExtensionList extensions) { 128 this.extensions = extensions; 129 } 130 } 131 | Popular Tags |