ServoOnOff.java
Go to the documentation of this file.
1 package com.generalrobotix.ui.actions;
2 
3 import org.eclipse.jface.action.IAction;
4 import org.eclipse.jface.viewers.ISelection;
5 import org.eclipse.ui.IWorkbench;
6 import org.eclipse.ui.IWorkbenchPage;
7 import org.eclipse.ui.IWorkbenchWindow;
8 import org.eclipse.ui.IWorkbenchWindowActionDelegate;
9 import org.eclipse.ui.PartInitException;
10 import org.eclipse.ui.PlatformUI;
11 
15 
16 public class ServoOnOff implements IWorkbenchWindowActionDelegate {
17  public ServoOnOff() {}
18 
19  public void run(IAction action) {
22  if(rhView==null){
23  IWorkbench workbench = PlatformUI.getWorkbench();
24  IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
25  IWorkbenchPage page = window.getActivePage();
26  try {
27  page.showView("com.generalrobotix.ui.view.GrxRobotHardwareClientViewPart", null, IWorkbenchPage.VIEW_CREATE);
28  } catch (PartInitException e1) {
29  e1.printStackTrace();
30  }
31  rhView = (GrxRobotHardwareClientView)manager_.getView( GrxRobotHardwareClientView.class, true );
32  }
33  //if(jythonView.getEnabledExecBtn())
34  //jythonView.selectExecBtn();
35  }
36 
37  public void selectionChanged(IAction action, ISelection selection) {}
38  public void dispose() {}
39  public void init(IWorkbenchWindow window) {}
40 }
void selectionChanged(IAction action, ISelection selection)
Definition: ServoOnOff.java:37
#define null
void init(IWorkbenchWindow window)
Definition: ServoOnOff.java:39
GrxBaseView getView(Class<?extends GrxBaseView > cls, boolean active)
org


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:51