|
Re: Headless Eclipse/E4 Applications? [message #1772976 is a reply to message #1772207] |
Tue, 19 September 2017 15:41 |
Eclipse User |
|
|
|
RCP is basically the Equinox/OSGi runtime with UI code. p2's core is independent of RCP. You can create your own Equinox IApplications, and you can run Swing code within your Equinox IApplication. You can also use p2 to do updates too, but you won't want/be able to use the p2 UI code, as it is centred around RCP.
|
|
|
|
Re: Headless Eclipse/E4 Applications? [message #1773113 is a reply to message #1772980] |
Thu, 21 September 2017 18:11 |
Eclipse User |
|
|
|
Think of the Eclipse IApplication class as a fancy main(): they're just entry points. You can have multiple entry points, and they can do SWT and AWT, providing you respect their threading requirements.
SWT and AWT/Swing can be combined in the same app providing you respect these threading requirements. Both SWT and Swing/AWT require that UI work is done on a particular thread; actions from other threads will result in exceptions. AWT allows you to use any particular thread, whereas SWT usually requires the SWT thread to be the first thread (the "main" thread). One risk of combining SWT and AWT is deadlock, especially if you have callbacks from one trigger work on the other (which is fairly common). Tom Schindl discovered that there's a way to run SWT and AWT on the same thread in Java 8, which greatly helps alleviate that problem.
On the other hand, your p2 work can be run from any thread.
So you could have a single IApplication that does some further dispatch internally.
|
|
|
Powered by
FUDForum. Page generated in 0.06307 seconds