Math2mat

/home/ythoma/docs/math2mat/svn/wp1/framework/m2mGUI/src/m2m/frontend/actions/LaunchOptimisationAction.java

Go to the documentation of this file.
00001 
00020 package m2m.frontend.actions;
00021 
00022 import org.eclipse.ui.IWorkbenchWindow;
00023 
00024 import m2m.frontend.actions.M2MAction;
00025 
00026 public class LaunchOptimisationAction extends M2MAction {
00027         
00028         public LaunchOptimisationAction(IWorkbenchWindow window, String label) {
00029                 super(window,label);
00030                 setImageDescriptor(m2m.frontend.Activator.getImageDescriptor("/icons/optimisation.gif"));
00031                 
00032         // The id is used to refer to the action in a menu or toolbar
00033                 setId(ICommandIds.CMD_OPTIM);
00034                 
00035         // Associate the action with a pre-defined command, to allow key bindings.
00036                 setActionDefinitionId(ICommandIds.CMD_OPTIM);
00037         }
00038         
00042         public void run() {
00043 
00044                 if (!getEditor("Error","There is no opened file to parse"))
00045                         return;
00046                 activateConsole();
00047                 
00048                 editor.getM2MProject().optimize();
00049         }
00050 }
 All Classes Namespaces Files Functions Variables Enumerations