Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » import org.eclipse.swt.*; not resolved (Compiler not resolving imports, despite plugin being in dependencies)
import org.eclipse.swt.*; not resolved [message #946591] Tue, 16 October 2012 06:16 Go to previous message
Peter King is currently offline Peter King
Messages: 3
Registered: September 2012
Junior Member
I seem to be going round in circles here.

I had a series of related projects that were working, and something has caused it not to work. The symptoms are that any source file using an import from an org.eclipse.swt bundle will not compile, with the red line being under the import statement(s).

Some of the projects have a plugin dependency on org.eclipse.swt jar, but others don't. If I try to add such a dependency, org.eclipse.swt isn't offered as a bundle, but only the platform dependent bundles such as org.eclipse.win32.win32.x86 can be added from the dependencies tab in the Manifest editor.
The build path accessed through right clicking on the source file in the Package Explorer shows the dependency too.

If I explicitly add the org.eclipse.win32.win32.x86 jar to the build path, most of the projects will build, but a couple still have errors ( the offending line in these is
SWTApplicationComposite window = new SWTApplicationComposite(parent);
and the obcection is to parent - as an unrecognised class Composite although it has been declared without a problem!)

I have tried deleting the dependency and then adding it as a new dependency, but the compiler still fails to find it.

Any clues as to what I might have missed (I'm doing this as part of an RCP development)

Thanks in advance for any help.

Peter

[Updated on: Tue, 16 October 2012 18:12]

Report message to a moderator

 
Read Message
Read Message
Previous Topic:Java Field Assist
Next Topic:getting the path of the currently working directory
Goto Forum:
  


Current Time: Sat May 18 18:43:30 EDT 2013

Powered by FUDForum. Page generated in 0.04791 seconds