Bakuriu
Bakuriu

Reputation: 101949

Cannot find Eclipse libraries even when specified as dependency

I'm developing part of an Eclipse plug-in. Currently the IDE is saying that packages such as org.eclipse.ui can't be resolved. I have correctly added org.eclipse.ui to the plugin.xml as dependencies required, as you can see in this picture:

Picture showing the plugin.xml view in Eclipse, containing references to the packages mentioned above.

As you can see the packages are listed but have the small red x symbol that indicates that something is wrong. If I try to select one of those names and try to go to declaration and such the IDE cannot find the package.

The IDE I'm using is an Eclipse Neon RCP, freshly installed on my Ubuntu system. AFAICT these packages should come with eclipse itself, if not how can I install them?

Note I previously used an older Eclipse RCP version to write the code. I'm positive that I did not have to install any special package for development. However I had some other issues and I decided to switch to Neon.

Upvotes: 1

Views: 79

Answers (1)

greg-449
greg-449

Reputation: 111142

Check the Target Platform is valid (in the 'Preferences' in 'Plug-in Development > Target Platform).

The target platform definitions are part of the workspace and might become invalid when you upgrade.

It is generally a good idea to use a separate target platform rather than the default 'Running Platform' as it gives you more control over which plug-ins are available and is less likely to become invalid during upgrades.

Upvotes: 1

Related Questions