Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse plugin dependency on SWT classes not being resolved

I have an eclipse plugin project which uses some swt objects, eg -

import org.eclipse.swt.widgets.Composite;

When I try to compile it with the 'Target Platform' set to 'Running Platform (Active)', it compiles fine and I dont need to import any swt specific plugins.

However, I created a target platform with Eclipse 3.6.0 and if I set it as the active platform the project has compile errors wherever swt classes are used and cannot resolve them.

Which plugin should I add a dependency to, to resolve these errors?

I tried adding 'org.eclipse.swt' but that does not seem to help.

like image 359
pdeva Avatar asked Dec 21 '10 09:12

pdeva


1 Answers

I had the same problem. In my case, I had a missing dependency and I asked Eclipse to locate the plugin for me.

After the plugin was found on some p2 site, I saw "Resetting Target Platform" in the progress view.

After that, a lot of plugins were broken. Checking the target platform (Window -> Preferences -> Plug-in Development -> Target Platform -> Edit), the field "Architecture" had changed from x86_64 to x86.

Changing the value back and clicking on "Finish" did reset the TP once more and the errors went away.

like image 152
Aaron Digulla Avatar answered Sep 27 '22 22:09

Aaron Digulla