本文整理汇总了Java中org.eclipse.ui.actions.ActionFactory.IWorkbenchAction.run方法的典型用法代码示例。如果您正苦于以下问题:Java IWorkbenchAction.run方法的具体用法?Java IWorkbenchAction.run怎么用?Java IWorkbenchAction.run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.actions.ActionFactory.IWorkbenchAction
的用法示例。
在下文中一共展示了IWorkbenchAction.run方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; //导入方法依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchAction savePerspectiveAction = ActionFactory.SAVE_PERSPECTIVE.create(window);
savePerspectiveAction.run();
return null;
}
示例2: execute
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; //导入方法依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchAction resetPerspectiveAction = ActionFactory.RESET_PERSPECTIVE.create(window);
resetPerspectiveAction.run();
return null;
}
示例3: run
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; //导入方法依赖的package包/类
/**
* Creates and executes and action in the Eclipse UI thread.
*
* @see Runnable#run()
* @see Display#asyncExec(Runnable)
* @see #runFactoryAction(ActionFactory)
**/
public void run()
{
IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchAction action = actionFactory.create(activeWindow);
action.run();
}