Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to use/export SWT 4.10 in a legacy RCP application
How to use/export SWT 4.10 in a legacy RCP application [message #1800917] Wed, 09 January 2019 17:08 Go to next message
Jason Palmatier is currently offline Jason PalmatierFriend
Messages: 9
Registered: July 2009
Junior Member
Hello,

Here is the short version of my question:

What is the official way to add the contents of the SWT zips downloaded from (https://download.eclipse.org/eclipse/downloads/drops4/R-4.10-201812060815/) to my IDE so that they will be used during compiles and pulled in during product export of my legacy 3.x RCP application when using the "Eclipse product export wizard" from the .product file's Overview pane?

The long background that brought me to this question:

I have a legacy 3.x RCP application that I'm building in compatibility mode with an Eclipse 2018-09 IDE for RCP Developers that has had the latest updates applied from the following update site:

http://download.eclipse.org/eclipse/updates/4.10/

The RCP application runs on Windows and Mac and uses SWT, and I would like to upgrade to the latest SWT version, which I have downloaded from here (I'm assuming the 4.10 SWT build is newer than the "3.109.0" versions in my IDE's plugin folder- let me know if that is wrong):

https://download.eclipse.org/eclipse/downloads/drops4/R-4.10-201812060815/

Files:

swt-4.10-win32-win32-x86_64.zip
swt-4.10-cocoa-macosx-x86_64.zip

I've seen in various posts that to use these in a standard Java project you do "File -> Import... -> Existing Projects into Workspace" and then select the downloaded SWT zip file (swt-4.10-win32-win32-x86_64.zip in this case) and then modify your build path to use the new SWT project, but I feel for an RCP application adding these should somehow be handled by the .product file under the Contents pane.

As a hack, I was thinking I could just replace the "org.eclipse.swt.win32.win32.x86_64_3.109.0.v20181204-1801.jar" file in my Eclipse IDE's plugins folder with the jar from the "swt-4.10-win32-win32-x86_64.zip" but this seemed like a bad idea and I also wasn't sure if I'd need to replace the "org.eclipse.swt_3.109.0.v20181204-1801.jar" and where I'd put the contents of the "swt-4.10-cocoa-macosx-x86_64.zip" to get the latest Mac stuff pulled in during the product export.

So my question again is, what is the official way to add the contents of the above SWT zips to my IDE so that they will be used during compiles and pulled in during product export when using the "Eclipse product export wizard" from the .product file's Overview pane?

Thanks,
Jason
Re: How to use/export SWT 4.10 in a legacy RCP application [message #1801520 is a reply to message #1800917] Mon, 21 January 2019 15:52 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 873
Registered: January 2012
Senior Member

Quote:
(I'm assuming the 4.10 SWT build is newer than the "3.109.0" versions in my IDE's plugin folder- let me know if that is wrong)


The Eclipse 2018-12 release train is based on Eclipse Platform 4.10. So what you see in your IDE is the same as those downloads.

But you're better off setting up your build to use Tycho and so be independent of your IDE!

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: How to use/export SWT 4.10 in a legacy RCP application [message #1801741 is a reply to message #1801520] Fri, 25 January 2019 13:37 Go to previous messageGo to next message
Jason Palmatier is currently offline Jason PalmatierFriend
Messages: 9
Registered: July 2009
Junior Member
Okay, awesome. So, in general, it sounds like if I have the latest Eclipse IDE I'm going to have the latest SWT plugins, too. I did manage to build the SWT plugins myself following the instructions to pull them from Git detailed here:

https://www.eclipse.org/swt/git.php

Then exporting them based on the FAQ answer here:

https://www.eclipse.org/swt/faq.php#howbuildplugin

I wasn't sure of any other way of getting the Mac version of the SWT plugin while running on a Windows system. I still haven't tried integrating either into my IDE or RCP export process, though it sounds like I won't need to worry about that for the win32 side. Tycho definitely sounds like the better way to go for building, especially multi-platform.

Thanks Brian!

Re: How to use/export SWT 4.10 in a legacy RCP application [message #1801869 is a reply to message #1801741] Mon, 28 January 2019 19:02 Go to previous message
Jason Palmatier is currently offline Jason PalmatierFriend
Messages: 9
Registered: July 2009
Junior Member
Okay, I've found the actual solution, which is to say I discovered Target Definitions. I finally stumbled onto this tutorial by Vogella:

http://www.vogella.com/tutorials/EclipseTargetPlatform/article.html

And followed the steps to create a Target Definition based on the following Software Site:

http://download.eclipse.org/eclipse/updates/4.10

Once I had selected the correct Eclipse plug-ins (I selected a lot, which I will be paring back on) and selected "Set as Active Target Platform" at the top of the Target Definition file's "Definition" tab all of my SWT compilation errors disappeared. I'll be attempting a product export soon and will verify that the latest SWT plug-ins are getting added to the build.

Jason
Previous Topic:SWT Browser Connection Limits
Next Topic:SWT Browser about:blank not firing DocumentComplete
Goto Forum:
  


Current Time: Thu Apr 02 15:36:48 GMT 2020

Powered by FUDForum. Page generated in 0.19286 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top