1 19 20 package org.netbeans.modules.lexer.editorbridge.calc; 21 22 import java.io.IOException ; 23 import org.openide.loaders.DataObjectExistsException; 24 import org.openide.loaders.MultiDataObject; 25 import org.openide.loaders.UniFileLoader; 26 import org.openide.filesystems.FileObject; 27 import org.openide.util.actions.SystemAction; 28 import org.openide.actions.OpenAction; 29 import org.openide.actions.FileSystemAction; 30 import org.openide.actions.CutAction; 31 import org.openide.actions.CopyAction; 32 import org.openide.actions.PasteAction; 33 import org.openide.actions.DeleteAction; 34 import org.openide.actions.RenameAction; 35 import org.openide.actions.ToolsAction; 36 import org.openide.actions.PropertiesAction; 37 38 39 45 46 public class CalcDataLoader extends UniFileLoader { 47 48 49 public static final String CALC_MIME_TYPE = "text/x-calc"; 51 static final long serialVersionUID = 1L; 52 53 public CalcDataLoader() { 54 super("org.netbeans.modules.lexer.editorbridge.calc.CalcDataObject"); } 56 57 protected void initialize() { 58 super.initialize(); 59 getExtensions().addMimeType(CALC_MIME_TYPE); 60 } 61 62 protected MultiDataObject createMultiObject(FileObject primaryFile) 63 throws DataObjectExistsException, IOException { 64 return new CalcDataObject(primaryFile, this); 65 } 66 67 protected SystemAction[] defaultActions() { 68 return new SystemAction[] { 69 SystemAction.get(OpenAction.class), 70 SystemAction.get(FileSystemAction.class), 71 null, 72 SystemAction.get(CutAction.class), 73 SystemAction.get(CopyAction.class), 74 SystemAction.get(PasteAction.class), 75 null, 76 SystemAction.get(DeleteAction.class), 77 SystemAction.get(RenameAction.class), 78 null, 79 SystemAction.get(ToolsAction.class), 80 SystemAction.get(PropertiesAction.class), 81 }; 82 } 83 84 } 85 | Popular Tags |