Eclipse Action
- Interface IAction
- package org.eclipse.jface.action;
- import org.eclipse.core.commands.IHandlerAttributes;
- import org.eclipse.jface.resource.ImageDescriptor;
- import org.eclipse.jface.util.IPropertyChangeListener;
- import org.eclipse.swt.events.HelpListener;
- import org.eclipse.swt.widgets.Event;
- public interface IAction {
- public static int AS_UNSPECIFIED = 0x00;
- public static int AS_PUSH_BUTTON = 0x01;
- public static int AS_CHECK_BOX = 0x02;
- public static int AS_DROP_DOWN_MENU = 0x04;
- public static int AS_RADIO_BUTTON = 0x08;
- public static final String TEXT = "text";
- public static final String ENABLED = "enabled";
- public static final String IMAGE = "image";
- public static final String TOOL_TIP_TEXT = "toolTipText";
- public static final String DESCRIPTION = "description";
- public static final String CHECKED = "checked";
- public static final String RESULT = "result";
- public static final String HANDLED = IHandlerAttributes.ATTRIBUTE_HANDLED;
- public void addPropertyChangeListener(IPropertyChangeListener listener);
- public int getAccelerator();
- public String getActionDefinitionId();
- public String getDescription();
- public ImageDescriptor getDisabledImageDescriptor();
- public HelpListener getHelpListener();
- public ImageDescriptor getHoverImageDescriptor();
- public String getId();
- public ImageDescriptor getImageDescriptor();
- public IMenuCreator getMenuCreator();
- public int getStyle();
- public String getText();
- public String getToolTipText();
- public boolean isChecked();
- public boolean isEnabled();
- public boolean isHandled();
- public void removePropertyChangeListener(IPropertyChangeListener listener);
- public void run();
- public void runWithEvent(Event event);
- public void setActionDefinitionId(String id);
- public void setChecked(boolean checked);
- public void setDescription(String text);
- public void setDisabledImageDescriptor(ImageDescriptor newImage);
- public void setEnabled(boolean enabled);
- public void setHelpListener(HelpListener listener);
- public void setHoverImageDescriptor(ImageDescriptor newImage);
- public void setId(String id);
- public void setImageDescriptor(ImageDescriptor newImage);
- public void setMenuCreator(IMenuCreator creator);
- public void setText(String text);
- public void setToolTipText(String text);
- public void setAccelerator(int keycode);
- }
IAction
- package org.eclipse.jface.action;
- IPageService
- public interface IPageService {
- public void addPageListener(IPageListener listener);
- public void addPerspectiveListener(IPerspectiveListener listener);
- public IWorkbenchPage getActivePage();
- public void removePageListener(IPageListener listener);
- public void removePerspectiveListener(IPerspectiveListener listener);
- }
- public interface IPageService {
- IRunnableContext
- public interface IRunnableContext {
- public void run(boolean fork, boolean cancelable,
- IRunnableWithProgress runnable) throws InvocationTargetException,
- InterruptedException;
- }
- public interface IRunnableContext {
- IServiceLocator
- public interface IServiceLocator {
- public Object getService(Class api);
- public boolean hasService(Class api);
- }
- public interface IServiceLocator {
- IShellProvider
- public interface IShellProvider {
- Shell getShell();
- }
- public interface IShellProvider {
- IWorkbenchWindow:A workbench window is a top level window in a workbench. Visually, a workbench window has a menubar, a toolbar, a status bar, and a main area for displaying a single page consisting of a collection of views and editors. Each workbench window has a collection of 0 or more pages; the active page is the one that is being presented to the end user; at most one page is active in a window at a time. Same as Activity???
- public interface IWorkbenchWindow extends IPageService,
- IRunnableContext,
- IServiceLocator,
- IShellProvider
- {
- public boolean close();
- public IWorkbenchPage getActivePage();
- public IWorkbenchPage[] getPages();
- public IPartService getPartService();
- public ISelectionService getSelectionService();
- public Shell getShell();
- public IWorkbench getWorkbench();
- public boolean isApplicationMenu(String menuId);
- public IWorkbenchPage openPage(String perspectiveId, IAdaptable input)
- throws WorkbenchException;
- public IWorkbenchPage openPage(IAdaptable input) throws WorkbenchException;
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException;
- public void setActivePage(IWorkbenchPage page);
- public IExtensionTracker getExtensionTracker();
- }
- public interface IWorkbenchWindow extends IPageService,
- Interface IActionDelegate
- package org.eclipse.ui;
- import org.eclipse.jface.action.IAction;
- import org.eclipse.jface.viewers.ISelection;
- public interface IActionDelegate {
- public void run(IAction action);
- public void selectionChanged(IAction action, ISelection selection);
- }
- package org.eclipse.ui;
- IWorkbenchWindowActionDelegate
- package org.eclipse.ui;
- import org.eclipse.ui.IActionDelegate;
- import org.eclipse.ui.IWorkbenchWindow;
- public interface IWorkbenchWindowActionDelegate extends IActionDelegate {
- public void dispose();
- public void init(IWorkbenchWindow window);
- }
- HelloAction
- package com.dragon.contribution.hello.actions;
- import org.eclipse.jface.action.IAction;
- import org.eclipse.jface.viewers.ISelection;
- import org.eclipse.ui.IWorkbenchWindow;
- import org.eclipse.ui.IWorkbenchWindowActionDelegate;
- import org.eclipse.jface.dialogs.MessageDialog;
- public class HelloAction implements IWorkbenchWindowActionDelegate {
- private IWorkbenchWindow window;
- public HelloAction() {
- }
- public void run(IAction action) { //implementation when clicking menu or button in tools button
- MessageDialog.openInformation(
- window.getShell(),
- "Hello",
- "Hello, Eclipse world");
- }
- public void selectionChanged(IAction action, ISelection selection) {
- }
- public void dispose() {
- }
- public void init(IWorkbenchWindow window) { //called by Eclipse core and pass window object created by runtime kernel
- this.window = window;
- }
- }
Eclipse Action的更多相关文章
- eclipse使用struts2找不到action方法或找不到action的错误记录
在确认web.xml已经配置, 配置好struts.xml , 代码没有报错, jar包没有问题, 服务器也没有问题, 代码逻辑没有问题, 关键字方法名action都没有写错, 可以运行旧的相同的代码 ...
- eclipse中配置struts2出现There is no Action mapped for namespace [/] and action name [Login] associated wi
下午在eclipse中配置struts2时报: There is no Action mapped for namespace [/] and action name [Login] associat ...
- eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with context path错误
eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with conte ...
- The command ("dfs.browser.action.delete") is undefined 解决Hadoop Eclipse插件报错
Hadoop Eclipse插件 报错. 使用 hadoop-eclipse-kepler-plugin-2.2.0.jar 如下所示 Error Log 强迫症看了 受不了 The command ...
- 【原】eclipse save action设置文件保存时自动格式化
学了一段java了,发现其实eclipse有很多实用小功能,能够让你编码的时候快捷方便,如果你苦于一些你常用到的功能无法自动实现,那么你可以上网查一下,就会发现其实eclipse已经给你提供了便捷之路 ...
- Eclipse groovy in action
Eclipse :Version: Juno Service Release 2GrEclipse plugins:http://dist.springsource.org/release/GRECL ...
- Eclipse 刚检出的项目 Build path 的时候提示 No action available
问题: 从SVN检出来的项目发现无法进行build path,也不报错,任何类之间也无法关联(Ctrl+右键无法点进去). 原因: .classpath是Eclipse的工程文件,别人没有将工程的信息 ...
- C#跨平台手机应用开发工具Xamarin尝试 与Eclipse简单对比
Xamarin 支持使用C#开发基于Android.IOS.WindowsPhone应用开发,最大特点C#+跨平台,详细说明问度娘. 安装 研究 想体验研究的点击查看页面 Xamarin For Vi ...
- eclipse运行没问题,tomcat以脚本启动后插入数据库的中文会乱码
记一次部署工程的时候遇到的问题 部署war包到win7的时候发现,布上去后插入数据库的中文会乱码,然后发现用eclipse运行源码没问题,一开始以为是war打出来的时候编码错误,然后将eclipse的 ...
随机推荐
- Qt 学习之路 2(18):事件
Home / Qt 学习之路 2 / Qt 学习之路 2(18):事件 Qt 学习之路 2(18):事件 豆子 2012年9月27日 Qt 学习之路 2 60条评论 事件(event)是由系统 ...
- pytorch 0.4.1安装问题
环境 ubuntu 16.04, anaconda3, python 2.7 将pytorch升级为0.4.1后,import torch报错 undefined symbol: _ZN4thpp10 ...
- Mybatis学习笔记(四) —— SqlMapConfig.xml配置文件
一.properties(属性) SqlMapConfig.xml可以引用java属性文件中的配置信息 在config下定义db.properties文件,如下所示: db.properties配置文 ...
- office word使用技巧汇总
1.用MathType编辑的公式放在Word中有时会显示不全,仅显示其中一部分. 以下教程介绍解决Word中MathType公式显示不全的方法. 在Word中粘贴完公式后,选中该公式,在工具栏里选择“ ...
- Django 的 model form 组件
Django 的 model form 组件 Model Form 组件的由来 之前介绍过 Django 的 Form 组件(Django的Form表单)使用方法,Form 组件能够帮我们做三件事: ...
- Java中的两个类:Desktop和SystemTray
在JDK6中 ,AWT新增加了两个类:Desktop和SystemTray,前者可以用来打开系统默认浏览器浏览指定的URL,打开系统默认邮件客户端给指定的邮箱发邮件,用默认应用程序打开或编辑文件(比如 ...
- 搭建element-ui Vue结构
1.安装淘宝镜像 npm install cnpm -g --registry=https://registry.npm.taobao.org 2.安装webpack cnpm install web ...
- WireShark抓包分析(二)
简述:本文介绍了抓包数据含义,有TCP报文.Http报文.DNS报文.如有错误,欢迎指正. 1.TCP报文 TCP:(TCP是面向连接的通信协议,通过三次握手建立连接,通讯完成时要拆除连接,由于TCP ...
- springBoot学习资料
转载:http://www.importnew.com/29363.html 官网搭建springBoot项目:https://www.cnblogs.com/lcplcpjava/p/7406253 ...
- selenium处理页面select元素
selenium为网页中选择框元素的获取特别引入了一个Select对象, 引入对象的方式: from selenium.webdriver.support.ui import Select 查询文档可 ...