eclipse-rcp

Add headless capability to existing eclipse plugin

寵の児 提交于 2019-12-05 23:54:08
I have an existing Eclipse plugin which run as a regular IDE plugin, receiving commands from the GUI and returning output in custom views. I want to add an ability to also be able to run that plugin in headless mode, with the input received from the command-line and the output going to some file. Is there some way of modifying the existing plugin to support that mode of execution in addition to the existing regular execution , or do I have to create a new headless plugin and just use code from the first one? It depends on how you plan to use this plugin and the main question: is there a case,

Eclipse RCP: Parallel jobs presented in one progress dialog?

只谈情不闲聊 提交于 2019-12-05 22:43:59
问题 I would like to show progress of multiple Jobs running in parallel, but in only one progress dialog. But each call to Job.setUser() seems to result in a new progress dialog. I've tried: Setting a common progress group on all the jobs (obtained via IJobManager.createProgressGroup()). Having one parent job call setUser() and join a job family to which all the parallel jobs belong. (This results in a message that progress is blocked on the parent job, by the background tasks.) What pattern can I

Eclipse RCP 4 - Handler method parameters

无人久伴 提交于 2019-12-05 22:43:40
I'm currently taking a look to the new Eclipse RCP framework and have a questions about handlers. In RCP 3.x a handler class needed to implement an interface, so the methods where given. In RCP 4 the handler class doesn't need to implement an interface. Instead you annotate the methods. E.g. if you have an ExitHandler as in Vogellas Tutorial you have an @Execute annotation. As you can see, there's an IWorkbench parameter passed. package com.example.e4.rcp.todo.handler; import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.ui.workbench.IWorkbench; public class ExitHandler {

Configure a p2 update repository programmatically

前提是你 提交于 2019-12-05 22:21:21
There is an article in the Eclipse wiki how to configure user's p2 default repositories of an RCP application by adding a static conf file to your product: Equinox/p2/Adding Self-Update to an RCP Application - Configuring the user's default repositories I want to do the same programmatically in a Java class when the user changes some configuration details. I could not find appropriate p2 API documentation for that. Use this solution for Eclipse 3.7 based applications: final ProvisioningUI ui = ProvUIActivator.getDefault().getProvisioningUI(); IArtifactRepositoryManager artifactManager = ProvUI

Eclipse RCP - good Eclipse Forms tutorial/resource

蹲街弑〆低调 提交于 2019-12-05 20:14:57
I'm looking for resources to learn how to use effectively Eclipse forms within an Eclipse RCP application. I was trying to use the newest SWT Window Builder plugin on Indigo but building forms this way doesn't really work for me eg. cannot put anything inside expandable composite etc. (I have Swing background with Netbeans designer) and I'm new to SWT. All I can find so far is this quite old tutorial from 2005. Any help, point to good tutorial/book/source code sample will be highly appreciated. Not much changed actually since the old 2005 tutorial so it's still very usable. Check these out in

How can I report progress from a background task?

时间秒杀一切 提交于 2019-12-05 18:00:17
I have a long running task that is executing in the background on an ExecutorService thread pool. What are some best practices in terms of this task returning progress or intermediate results? Are there any libraries that provide this functionality? EDIT: To clarify, I'm talking about reporting progress to other code, not to the user. Normally I would use SwingWorker, but I'm working with a Java/Groovy backend for a Grails app, and I'm unsure how that would behave in a headless server environment since it has EDT ties. Another example is the Jobs framework in Eclipse RCP, but I would need

How to keep SWT menu open after user clicks menu item?

偶尔善良 提交于 2019-12-05 16:03:40
I have an Eclipse RCP / SWT application with a Menu of Check Box Menu Items. I would like to be able to check/uncheck multiple items before clicking elsewhere to close the menu. However, the default SWT behavior is to close the menu after a single click. I have implemented the following very hacked solution which works, but is certainly not elegant and probably won't work properly on all platforms or under all circumstances. So I'm very interested in a simpler technique if one exists. The following code should compile and run inside eclipse right out of the box (apologies for the length, its

How to inject parameter with ParameterizedCommand in Eclipse 4.3?

天大地大妈咪最大 提交于 2019-12-05 16:01:41
I am currently implementing an Eclipse 4.3 application and running into a problem. I try to parametrize a command to delete specific files. My approach is corresponding to Getting parameter of parameterized command in Eclipse RCP 4.2 , but i somehow don't get it working right. In my Application.e4xmi I have added a command with a parameter: <commands xmi:id="_K1MVgDGKEeOO8o2ChqdHMA" elementId="first.application.command.deleteproject" commandName="deleteProjectCommand"> <parameters xmi:id="_Hr4FEDGTEeOO8o2ChqdHMA" elementId="cmd0" name="cmd0" typeId="" optional="false"/> </commands> At one

“Add Required Plug-ins” button in Eclipse RCP product configuration?

时光毁灭记忆、已成空白 提交于 2019-12-05 14:42:27
I don't quite understand what plug-ins constitue the list Dependencies when I make a product configuration in Eclipse RCP and what does the button "Add Required Plug-ins" exactly do? Why the Dependencies list is not full from the very beginning and why I have to use that button? Thank you. When you develop your RCP application, you specify: not enough plugins (i.e. only the one you need to compile, but not their runtime dependencies) and/or too many plugins (i.e. you depends on some provided by eclipse, even though you do not use them all) In order to launch your RCP application as a

In Eclipse RCP, how do I disable a save toolbar button according to the “dirty” property in editor

非 Y 不嫁゛ 提交于 2019-12-05 13:26:35
In my eclipse RCP 3.3 application, I would like to enable or disable a 'save' toolbar button according to current editor dirty flag . I'm trying to use the < enabledWhen > tag but I can't make it work. Here's the portion of code in plugin.xml : <command commandId="org.acme.command.save" icon="icons/save.png" id="org.acme.command.save" style="push"> <enabledWhen> <instanceof value="activeEditor"/> <test property="dirty" value="true"/> </enabledWhen> </command> Do you have any idea how that is supposed to work ? Support for the 'Save' and 'Save All' actions is provided by the workbench so you