Dependency "class folder with attached source"

Answered

Hey,

I'm doing eclipse plugin development with IntelliJ. Don't ask why... :)

One thing that currently isn't working is that I can't add org.eclipse.swt.gtk.linux as a dependency. All other .jar-Files under/usr/share/eclipse/droplets/eclipse-sdk/eclipse/plugins are properly added to my project by IntelliJ, but this jar is not added. Eclipse calls it a "class folder with attached source" according to the symbol in their IDE. Is there a reason why this shouldn't work? The file is under: /usr/share/eclipse/droplets/eclipse-sdk/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64.source_3.106.2.v20171217-1438.jar

I got it working by extracting the jar and including it as a new Module. Then I added it to my eclipse-Plugin-Module as a module dependency.

Hope someone may have an idea!

0
5 comments

What happens when you try to add it?

0
Avatar
Permanently deleted user

It asks me to "Choose Categories of Selected Files". I can then add it. It is shown under Dependencies but imports are still not resolvable. All other (or at least the jars I need) are properly loaded from  /usr/share/eclipse/droplets/eclipse-sdk/eclipse/plugins/

I am using the OSGi API Library to import the other jars. But this one is strangely not imported. Maybe someone can test it with their own eclipsePlugin with View contribution.

0

This dependency jar seems to contain sources only, so it can't be used to resolve imports.

When you configure it as a module, IDE builds the sources and the dependencies are correctly resolved.

This works as expected and I don't see any problems here.

0
Avatar
Permanently deleted user

You're right. There are only source-files. But wouldn't it be at least a nice feature to support this kind of dependency as eclipse supports it?

0

Not sure how exactly Eclipse handles such dependencies. Does it automatically configure it as a project with sources, builds this project and makes the other project depend on the classes it has built? What if other jars/dependencies are needed to build these sources, how does one tell Eclipse where to look for the jars needed to build these sources?

0

Please sign in to leave a comment.