Reputation: 17002
(Disclaimer: Neither of the following are true: (1) Java is my forte, and (2) I'm a pro at Plug-in development.)
My Eclipse plug-in project includes 5 plugins. 2 of them compile just fine. The 3 that don't include dependencies on classes in the org.eclipse.swt.widgets
or org.eclipse.swt.graphics
packages. The (extremely annoying) compile-time error message is:
The type org.eclipse.swt.widgets.Control cannot be resolved.
It is indirectly referenced from required .class files.
Now, I've been over this workspace with a fine-toothed comb. I've checked and rechecked the following:
I've googled and stackoverflowed till my eyes are bleeding. None of the typical suggestions seem to be helping.
I'm certain however, that the usual truth is going to prove to be the case here. (All things being equal, the answer is usually something simple, stupid, and painfully obvious.)
Can someone kindly suggest something I haven't yet looked at? I'm more than willing to provide whatever information you may require.
P.S. And might I note that there are way too many places to look to configure dependencies for plugins? Great googly moogly.
Upvotes: 3
Views: 2804
Reputation: 11
Upvotes: 1
Reputation: 373
There is a disconnect between your target platform and the swt plugins available in your environment.
The fields in the "Target Environment" will be used to load your swt plug-in. The any field not filled in, will default to the values detected for the current environment.
In your case, you have an win32.x86 swt jar. If you are running on 64-bit windows, and the Architecture field is blank, your 32-bit swt jar will not load. You have two options to fix any discrepancies:
Upvotes: 7
Reputation: 15498
That basically means that it is an indirect unsatisfied dependency: a class from a library you're using needs some other class to be on the class-path :)
Now I have no idea how you manage your dependencies (maven or manually) but as a starting point you could use jarfinder.com to find and download the necessary library if you don't have it already: http://www.jarfinder.com/index.php/java/info/org.eclipse.swt.widgets.Control
If you're using Maven, you should look in the logs as it tries to download all the necessary libraries, dependencies included. So if anything went wrong it should point out in the log a connectivity problem or the impossibility of downloading an artefact for some other reason.
Upvotes: 1