Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » SWT and JFace unresolved after project import
SWT and JFace unresolved after project import [message #530383] Thu, 29 April 2010 10:32 Go to next message
Mathias Zenger is currently offline Mathias Zenger
Messages: 10
Registered: July 2009
Junior Member
Hi,

I set up a new IDE and target platform on Eclipse 3.5 (Galileo). Then I used the import wizard to import some plug-in projects written in Eclipse 3.4 (Ganymede).

Now I face the problem that all imports from org.eclipse.swt and org.eclipse.jface can't be resolved. Example error message:

- The type org.eclipse.swt.widgets.Composite cannot be resolved. It is indirectly referenced from required .class files

- The type org.eclipse.jface.util.IPropertyChangeListener cannot be resolved. It is indirectly referenced from required .class files


Am I missing any important plug-ins in my target platform (on my opinion everything needed should be there)? What could be wrong here? Things used to work fine in Ganymede...

Thanks for your help!
Re: SWT and JFace unresolved after project import [message #530491 is a reply to message #530383] Thu, 29 April 2010 14:42 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6850
Registered: July 2009
Location: Ottawa
Senior Member

What do the plugins in question say in their MANIFEST.MF about
Require-Bundle for org.eclipse.swt and org.eclipse.jface?

If you do a clean all and force a re-build, does that fix it (do you
still have build automatically checked?)

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: SWT and JFace unresolved after project import [message #530575 is a reply to message #530491] Fri, 30 April 2010 04:28 Go to previous messageGo to next message
Mathias Zenger is currently offline Mathias Zenger
Messages: 10
Registered: July 2009
Junior Member
Dear Paul,

Thank you for the hints. Unfortunately clean and manually build did not help. However, in the manifest files there's now trace of the SWT and JFace plug-ins under the Require-Bundle item. So I just started to add the following plug-ins as dependencies to my projects until all errors had disappeard:

org.eclipse.ui_3.5.0
org.eclipse.ui.forms_3.4.1
org.eclipse.swt_3.5.0
org.eclipse.jface_3.5.0
org.eclipse.core.commands_3.5.0

For me it's surprising since in my Ganymede installation (which I haven't set up by myself) the above plug-ins are not added as dependencies in the same projects. Could it be that there was a noticeable change from 3.4 to 3.5? Or was my former target platform / build paths somehow different?

Regards, Mathias
Re: SWT and JFace unresolved after project import [message #530715 is a reply to message #530575] Fri, 30 April 2010 11:24 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6850
Registered: July 2009
Location: Ottawa
Senior Member

As a general rule you should have org.eclipse.ui (it re-exports jface
and swt, and core.commands) in your require bundle if you are
contributing to the UI. It wouldn't work at all without that. Then you
would add org.eclipse.ui.forms to make use of FormToolkit.

Maybe the dependencies had been added to the project classpath. I know
in the later releases PDE really tightened the rules around what it
would compile.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: SWT and JFace unresolved after project import [message #535685 is a reply to message #530383] Tue, 25 May 2010 05:16 Go to previous message
Andreas Schmid is currently offline Andreas Schmid
Messages: 17
Registered: July 2009
Junior Member
I would try to go to my run-configuration...
1. deselect all plugins,
2. select the plugin which i would like to run
3. add all required plugins.

Maybe this will help.

Another option could be to check your dependencies, in your plugin.xml.

HTH

Andreas

Am 29.04.2010 16:32, schrieb Mathias Zenger:
> Hi,
>
> I set up a new IDE and target platform on Eclipse 3.5 (Galileo). Then I
> used the import wizard to import some plug-in projects written in
> Eclipse 3.4 (Ganymede).
>
> Now I face the problem that all imports from org.eclipse.swt and
> org.eclipse.jface can't be resolved. Example error message:
>
> - The type org.eclipse.swt.widgets.Composite cannot be resolved. It is
> indirectly referenced from required .class files
>
> - The type org.eclipse.jface.util.IPropertyChangeListener cannot be
> resolved. It is indirectly referenced from required .class files
>
> Am I missing any important plug-ins in my target platform (on my opinion
> everything needed should be there)? What could be wrong here? Things
> used to work fine in Ganymede...
>
> Thanks for your help!
Previous Topic:Activate EditorPart
Next Topic:OpenGL rendering to an SWT Image
Goto Forum:
  


Current Time: Wed Apr 16 00:31:28 EDT 2014

Powered by FUDForum. Page generated in 0.05816 seconds