Community
Participate
Working Groups
When developing a standalone SWT application (i.e. non RCP) I need to link against the SWT libraries. Normally, this involves extending the ECLIPSE_HOME environment variable and then selecting the appropriate SWT libraries that Eclipse came with, but it's then non-portable to different versions of Eclipse. If there was an SWT classpath container that always contained the org.eclipse.swt_* and org.eclipse.swt.OS_* Jars for the platform at hand, then I could just click on the 'Add Library' (in much the same way that the JRE or plugin-dependencies are added). This could then be made available for future versions of Eclipse, and regardless what level of Eclipse (3.2.0, 3.2.1 ... 3.3.0/4.0.0) was being run against, the default platform's SWT classpath library would still be valid. I beliee that JDT Core provides these classpath environment variables, but it's possible that it should be reassigned to another component. Eclipse 3.2RC1a on Mac OS X 10.4.5, but applicable to any OS.
NB a workaround is to create a user library to do this.
Neither the JRE container, nor the PDE container do belong to JDT/Core. The same would apply to SWT container. It should be contributed by some 3rd party who leverages SWT in IDE (I am not aware of any so far). JDT is agnostic about such library specifities.
The JDT has 'Run as SWT application' as an action, so there is some implicit support from JDT to SWT applications; perhaps this is only UI though. The fact is that in order for that to make sense, the project has already had to be set up with the appropriate SWT libraries. Whilst JDT may be agnostic, the 'Run as SWT application' certainly isn't. Moving to JDT-UI if that's more appropriate.
I agree with Alex, there should be predefined user lib for swt in jdt by default
'Run as SWT application' is a launching configuration. Moving to JDT/Debug then.
Darin, this is a dup of bug 122527
*** This bug has been marked as a duplicate of 122527 ***
Verified dup. People who've voted on this might like to address further attention to the bug 122527