当前位置: 首页 > wzjs >正文

个人做的网站不能做淘客最近新闻热点

个人做的网站不能做淘客,最近新闻热点,怎么重新安装我的wordpress,广州知名网站设计西门子 Teamcenter13 Eclipse RCP 开发 1.2 工具栏 开关按钮 1 配置文件2 插件控制3 命令框架 位置locationURI备注菜单栏menu:org.eclipse.ui.main.menu添加到传统菜单工具栏toolbar:org.eclipse.ui.main.toolbar添加到工具栏 style 值含义显示效果push普通按钮(默…

西门子 Teamcenter13 Eclipse RCP 开发 1.2 工具栏 开关按钮

  • 1 配置文件
  • 2 插件控制
  • 3 命令框架

位置locationURI备注
菜单栏menu:org.eclipse.ui.main.menu添加到传统菜单
工具栏toolbar:org.eclipse.ui.main.toolbar添加到工具栏
style 值含义显示效果
push普通按钮(默认)普通的点击按钮,点一下执行一次
toggle切换按钮有按下/弹起两种状态,比如"开关"
radio单选按钮多个按钮互斥选择,比如 “模式切换”

1 配置文件

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin><extension point="org.eclipse.ui.menus"><menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar"><toolbar id="com.example.toolbar"><command commandId="com.example.commands.helloCommand" icon="icons/sample.png" tooltip="开关按钮" label="开关按钮" style="toggle"></command></toolbar></menuContribution></extension><extension point="org.eclipse.ui.handlers"><handler class="com.xu.work.tool2.handlers.SampleHandler" commandId="com.example.commands.helloCommand"></handler></extension><extension point="org.eclipse.ui.commands"><command id="com.example.commands.toggleCommand" name="开关按钮"/></extension></plugin>

2 插件控制

package com.xu.work.tool2;import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;/*** 插件激活器类,控制插件的生命周期*/
public class Activator extends AbstractUIPlugin {/*** 插件ID常量,通常与MANIFEST.MF中的Bundle-SymbolicName一致*/public static final String PLUGIN_ID = "com.xu.work.tool2"; //$NON-NLS-1$/*** 单例实例引用*/private static Activator plugin;/*** 构造函数*/public Activator() {}/*** 插件启动时调用*/@Overridepublic void start(BundleContext context) throws Exception {super.start(context);plugin = this;// 在这里注册监听器、服务、加载配置等}/*** 插件停止时调用*/@Overridepublic void stop(BundleContext context) throws Exception {plugin = null;super.stop(context);}/*** 返回此插件的共享实例** @return 共享实例*/public static Activator getDefault() {return plugin;}}

3 命令框架

package com.xu.work.tool2.handlers;import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.commands.ToggleState;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;public class SampleHandler extends AbstractHandler {private static final String STATS = "org.eclipse.ui.commands.toggleState";private static IPreferenceStore preferenceStore;public static void setPreferenceStore(IPreferenceStore store) {preferenceStore = store;}@Overridepublic Object execute(ExecutionEvent event) throws ExecutionException {Command command = event.getCommand();// 获取状态ToggleState state = (ToggleState) command.getState(STATS);if (state == null) {state = new ToggleState();command.addState(STATS, state);}// 打印状态boolean currentState = HandlerUtil.toggleCommandState(command);IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);MessageDialog.openInformation(window.getShell(), "切换按钮", "切换按钮的状态是" + currentState);// 保存状态if (preferenceStore != null) {preferenceStore.setValue(STATS, currentState);}return null;}}

在这里插入图片描述

http://www.dtcms.com/wzjs/57392.html

相关文章:

  • 株洲网站制作公司在哪里百度一下生活更好
  • 网站中搜索栏怎么做的进入百度官网首页
  • 手机做网站用什么软件西安网站到首页排名
  • 网站哪个好苏州关键词优化排名推广
  • 做代购的网站生意参谋官网
  • 郑州移动端网站建设企业培训内容包括哪些内容
  • 2017做那个网站能致富营销推广投放平台
  • 单页面网站模板怎么做seo网站推广软件
  • 做房产网站需要了解什么seo用什么论坛引流
  • 江西省建设监理网站小说网站排名
  • 一个虚拟主机绑定2个网站软文营销的案例
  • php 深圳 电子商务网站开发baike seotl
  • 做网站 新域名 还是卖网站链接
  • 网站建设 网站优化win7优化大师好不好
  • 宁夏住房和建设厅官方网站seo分析报告怎么写
  • z-blog和wordpress网站排名优化软件哪家好
  • 外贸推广免费网站拉新项目官方一手平台
  • 郑州快速网站建设冯耀宗seo
  • 福州企业网站建设seo秘籍优化课程
  • 网站改版方案原则网络销售的工作内容
  • 龙岗区网站建设公司抖音seo搜索引擎优化
  • 公司做网站要注意什么企业网站搭建
  • 做网站登录页面的论文公司的公关
  • 网站建设调查分析百度2020新版下载
  • 扁平化 网站联合早报 即时消息
  • 政府 网站建设 投标百度seo搜索
  • 广东汕头最新传染疫情seo一个月工资一般多少
  • 网站推广服务怎么做安徽seo推广公司
  • 小程序开发需要什么技术aso安卓优化公司
  • 网站建设颜色注意事项郑州seo代理商