Question

I'm developing an RCP project using Eclipse-Helios.

The version of SWT that is installed (in the plugins directory) is [org.eclipse.swt-win32-3.6.2, & org.eclipse.swt.jar]

I require new API functionality that is only available from swt-3.8. (specifically, I wish to set the custom colours, for an SWT color dialog before opening.)

I have downloaded 3.8.1 from the SWT/Eclipse downloads site [ http://download.eclipse.org/eclipse/downloads/drops/R-3.8-201206081200/#SWT ]

  • The SWT download is NOT a plugin (couple of jars, src.zip and some readme files), so I am unable to add it to my "Target Platform" (it doesn't appear as an available jar even after adding the containing directory in "locations")
  • I was unable to find an update site for SWT (or any site where i could get a plugin for the newer version)

If I add the swt.3.8.jar to my classpath (and then increase it's order-priority in the project build-path), I am able to access the newer api functionality from my code (as well as view the source). When I run the application however, it seems as though the runtime is still using the older SWT jar, as i get an unknown method error, when attempting to access the newer functionality.

Questions:

  1. Is there an SWT repository location that I can use to download a newer version of SWT using the eclipse install manager?
  2. If not, is there a way I can force the runtime to ignore the older version (I assume via plugin.xml)?
  3. Is there a better way to achieve what I am trying to do?
  4. What is the difference between the two SWT jars currently in the helios plugins directory (as the 3.8 download only contains the win-32 version)?

Thanks in advance.

Was it helpful?

Solution

SWT is downloadable as a separate plugin here:
http://download.eclipse.org/eclipse/downloads/drops/R-3.8-201206081200/#SWT

Eclipse 3.8 contains regular plugins including the SWT (the win32 specific as well as the generic "org.eclipse.swt_.jar"). I am currently using the 3.8 version and they appear as plugins.

I also have Eclipse 3.6 (Helios) and I was able to import the swt plugins using the "File->Import->Plug-in Development->Plug-ins and Fragments" wizard. I just specified the eclipse 3.8 directory and could import them in my workspace. Once imported I can of-course use them to be included in the runtime environment. Eclipse should use the latest version automatically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top