package CDBuilder.buttons; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; /** * @author K. Omair Muhi * RADS lab * Carleton University * Ottawa,ON,Canada * * @version 1.0 May 31, 2005 */ public class SimuModelica extends Action implements IWorkbenchWindowActionDelegate { public SimuModelica() { super(); this.setText("Modelica Simulator"); this.setDescription("Simulate Modelica models in CD++"); } /*The method below is called when the user clicks on the Modelica button*/ public void run (){ SimuModelicaGUI dialog = new SimuModelicaGUI (new Shell()); dialog.create(); dialog.open(); dialog.close(); } public void run(IAction action) { run(); } public void selectionChanged(IAction action, ISelection selection) { //do nothing } public void dispose() { //do nothing } public void init(IWorkbenchWindow window) { //do nothing } }