Math2mat

/home/ythoma/docs/math2mat/svn/wp1/framework/m2mGUI/src/m2m/frontend/actions/ClearProject.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 ClearProject extends M2MAction {
00027         
00028 
00029         public ClearProject(IWorkbenchWindow window, String label) {
00030                 super(window,label);
00031                 
00032             // The id is used to refer to the action in a menu or toolbar
00033                 setId(ICommandIds.CMD_CLEAR);
00034                 
00035             // Associate the action with a pre-defined command, to allow key bindings.
00036                 setActionDefinitionId(ICommandIds.CMD_CLEAR);
00037                 // setImageDescriptor(com.reds.m2mgui.Activator.getImageDescriptor("/icons/octave.gif"));
00038         }
00039         
00040         public void run() {
00041                 if (!getEditor("Error","Select the tab with the code you want to transform in VHDL"))
00042                         return;
00043                 activateConsole();              
00044                 editor.getM2MProject().clear();
00045                 System.out.println("Project cleared");
00046         }
00047         
00048 }
 All Classes Namespaces Files Functions Variables Enumerations