Math2mat
|
00001 00020 package m2m.frontend.actions; 00021 00022 import org.eclipse.ui.IWorkbenchWindow; 00023 00024 public class CopyAction extends M2MAction { 00025 00026 public CopyAction(IWorkbenchWindow window, String label) { 00027 super(window,label); 00028 // The id is used to refer to the action in a menu or toolbar 00029 setId(ICommandIds.CMD_COPY); 00030 // Associate the action with a pre-defined command, to allow key bindings. 00031 setActionDefinitionId(ICommandIds.CMD_COPY); 00032 setImageDescriptor(m2m.frontend.Activator.getImageDescriptor("/icons/Copy.png")); 00033 } 00034 00038 public void run(){ 00039 if (!getEditor("Error","Select a correct M2M editor")) 00040 return; 00041 editor.copy(); 00042 } 00043 }