rcp

Switch Image of a Handler in a e4 rcp

…衆ロ難τιáo~ 提交于 2021-02-10 14:59:50
问题 I have an e4 rcp application and I want to extend my application with a toolbar item that should change the icon URL when the user execute it. Is there any possibility to do this as I can do it in a MPart? 回答1: Just call the setIconURI method of MToolItem in your handler for the tool item: @Execute public void execute(MToolItem mitem) { mitem.setIconURI("platform:/plugin/......"); ... other code } 来源: https://stackoverflow.com/questions/46191767/switch-image-of-a-handler-in-a-e4-rcp

Switch Image of a Handler in a e4 rcp

独自空忆成欢 提交于 2021-02-10 14:58:40
问题 I have an e4 rcp application and I want to extend my application with a toolbar item that should change the icon URL when the user execute it. Is there any possibility to do this as I can do it in a MPart? 回答1: Just call the setIconURI method of MToolItem in your handler for the tool item: @Execute public void execute(MToolItem mitem) { mitem.setIconURI("platform:/plugin/......"); ... other code } 来源: https://stackoverflow.com/questions/46191767/switch-image-of-a-handler-in-a-e4-rcp

Switch Image of a Handler in a e4 rcp

二次信任 提交于 2021-02-10 14:57:13
问题 I have an e4 rcp application and I want to extend my application with a toolbar item that should change the icon URL when the user execute it. Is there any possibility to do this as I can do it in a MPart? 回答1: Just call the setIconURI method of MToolItem in your handler for the tool item: @Execute public void execute(MToolItem mitem) { mitem.setIconURI("platform:/plugin/......"); ... other code } 来源: https://stackoverflow.com/questions/46191767/switch-image-of-a-handler-in-a-e4-rcp

Eclipse RCP multithreading

╄→尐↘猪︶ㄣ 提交于 2021-02-07 17:56:29
问题 I have an eclipse rcp application. And I have a command when this command is executing. I need to start a thread. After execution of this thread GUI must be updated. But I suppose that this thread or other non-SWT thread cannot update GUI. But it seems reasonable. When I was trying to do that I got Exception in thread "Thread-5" org.eclipse.swt.SWTException: Invalid thread access . How I can make this goal? 回答1: Using SWT you need to have anything that updates the GUI be done on the main

Eclipse RCP multithreading

余生颓废 提交于 2021-02-07 17:55:33
问题 I have an eclipse rcp application. And I have a command when this command is executing. I need to start a thread. After execution of this thread GUI must be updated. But I suppose that this thread or other non-SWT thread cannot update GUI. But it seems reasonable. When I was trying to do that I got Exception in thread "Thread-5" org.eclipse.swt.SWTException: Invalid thread access . How I can make this goal? 回答1: Using SWT you need to have anything that updates the GUI be done on the main

RCP菜单栏,工具栏实现的两种方法及RCP记事本例子

六眼飞鱼酱① 提交于 2020-03-12 12:16:09
RCP菜单栏,工具栏实现方法及RCP记事本例子 一、创建工程 file->new->other->plug-ins project,创建一个名为org.test.menuAndToolbar的工程: 选择创建RCP hello world 模板的项目,点击finish完成创建项目: 二、 添加菜单栏 点击plugin.xml文件,打开extensions页: 可以看到, Extentions 本来已经有两个扩展包含在里面了,现在我们要添加一个 actionSets扩展,点击“add”按钮,添加org.eclipse.ui.actionSets: 添加进org.eclipse.ui.actionSets后会默认有一个actionSet,要把它的visible设置为true,一定要设置为true,否则看不到菜单栏: 在actionSet上右键添加一个menu, 给 menu新建一个separator,命名为separator1: 在label(actionSet)上右键新建一个action: 这个action的Label设置为“打开”,menubarPath设置为:org.test.menuAndToolbar.menu1/separator1。Class设置为: actions.OpenFileAction 。 设置好以后点击 class超链接,会提示新建一个类,选择默认设置

Eclipse RCP开发桌面程序

扶醉桌前 提交于 2020-02-03 02:22:53
所谓RCP,就是Rich Client Platform的缩写,即富客户平台,是Eclipse进化的产物(自3.0版以后出现),是Eclipse组织向用户提供的强大的开放性开发平台,能够使用户方便地创建自己的基于Eclipse的应用程序,并且这些应用程序能够得到Eclipse的底层支持。更重要的是,我们可以利用Java创建象Eclipse这么漂亮的桌面程序。   我相信,在未来的几年里,RCP一定会变得非常流行。使用RCP,我们可以开发界面象Eclipse这样漂亮的桌面程序,比如医院管理系统啊、CAD软件等等。遗憾的是,目前在国内基本上找不到关于RCP的中文资料,我们只能通过自己的探索来为我们的程序添加我们想要的功能。   下面让我们一步一步来建立一个Eclipse RCP程序,下面的内容可以说在Google上一搜一大把,有些人会觉得乏味,但是没关系,这只是一个快速的起步。   选择“新建--项目”,选择“插件项目”: 点下一步,输入项目名称,选择Eclipse版本,我这里选择的是3.2:   点下一步,插件标识和插件名称可以更改,其他的内容都可以保持默认,一定要记得选中富客户机应用程序支持:   点下一步,选中一个模板,这里选一个最简单的,到时候看源代码的时候便于理解:   点下一步,改一下应用程序标题:   点完成,我们可以在项目上面点右键,选择按Eclipse程序运行

RCP 项目启动图片设置

时光毁灭记忆、已成空白 提交于 2020-02-03 02:22:35
第一步 选择启动图片命名为 splash.bmp 第二步 添加 扩展点 然 后在右边的扩展元素细节中填入相应的信息,比如我们在这里的application属 性 为 org.vwpolo.rcp.example.application,name 属性为org.vwpolo.rcp.example,然后 再在这个 product 上右键新增属性,我们要新增以下属性 Name: appName Value:欢迎使用RCP程序 Name:startupForegroupColor Value:000000 Name:preferenceCustomization Value:plugin_customization.ini Name:startupMessageRect Value:10,270,300,16 Name:startupProgressRect Value:10,250,300,16 注释: appName为应用程序的名称,就是显示在标题栏的名字 startupForegroupColor 为应用程序启动时候的前景色 preferenceCustomization 为应用程序启动配置的属性文件,文件作用等下做解释 startupMessageRect 为当闪屏启动时闪屏上显示文字的坐标 startupProgressRect 为闪屏上的进度条显示坐标 第三步添加或者修改

How to get exactly Eclipse Editor kind of Tool Tip in RCP/SWT Table cell

99封情书 提交于 2020-01-15 07:37:13
问题 I want to get Exactly eclipse editor kind highly customized tooltip like below- I used eclipse provided snippets of customized Tooltips but none of them were so highly improvised performance and easy to use. How to reuse these Tooltips , any example would help. 回答1: you just need to extend org.eclipse.jface.window.ToolTip and override protected abstract Composite createToolTipContentArea(Event event, Composite parent); you can add org.eclipse.swt.browser.Browser and set formatted content and

RCPTT running Java code from the script

家住魔仙堡 提交于 2020-01-14 09:08:49
问题 I am looking for some way to run some Java code directly from the test script I am writing for our RCP application. I need to set up a multi-cast socket in the test before clicking a particular button in the application. Something like this: MulticastSocket socket = new MulticastSocket(); socket.setNetworkInterface(interfaceTarget); InetAddress group = InetAddress.getByName("220.2.2.2"); socket.joinGroup(group); I was unable to find any way to do this just wondering if this is possible? 回答1: