1 package com.generalrobotix.ui.actions;
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;
16 public class ServoOnOff implements IWorkbenchWindowActionDelegate {
19 public void run(IAction action) {
23 IWorkbench workbench = PlatformUI.getWorkbench();
24 IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
25 IWorkbenchPage page = window.getActivePage();
27 page.showView(
"com.generalrobotix.ui.view.GrxRobotHardwareClientViewPart",
null, IWorkbenchPage.VIEW_CREATE);
28 }
catch (PartInitException e1) {
39 public void init(IWorkbenchWindow window) {}
void selectionChanged(IAction action, ISelection selection)
static Activator getDefault()
void init(IWorkbenchWindow window)
GrxBaseView getView(Class<?extends GrxBaseView > cls, boolean active)
RobotHardware RTC client view.
GrxPluginManager manager_