Math2mat
|
00001 00019 package m2m.frontend.actions; 00020 00021 import org.eclipse.ui.IWorkbenchWindow; 00022 00023 import m2m.frontend.actions.M2MAction; 00024 00029 public class GenerateMath2MatCode extends M2MAction { 00030 00031 public GenerateMath2MatCode(IWorkbenchWindow window, String label) { 00032 super(window,label); 00033 00034 // The id is used to refer to the action in a menu or toolbar 00035 setId(ICommandIds.CMD_GENERATECODE); 00036 00037 // Associate the action with a pre-defined command, to allow key bindings. 00038 setActionDefinitionId(ICommandIds.CMD_GENERATECODE); 00039 } 00040 00044 public void run() { 00045 00046 if (!getEditor("Error","There is no opened file to parse")) 00047 return; 00048 activateConsole(); 00049 00050 editor.getM2MProject().reGenerateOctave(); 00051 } 00052 }