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