Reputation: 190659
I have an eclipse plugin project com.prosseek.asttest
, and I spin off a new plugin project com.prosseek.impactAnalyzer
that has one class CallHierarchyGenerator.java
. Now asttest project depends on impactAnalyzer project. I had no choice but to make impactAnalyzer project eclipse plugin as it uses JDT library.
After setting up the build path in com.prosseek.asttest
, it builds without a problem.
However, when I execute the plugin, I got an error missing CallHierarchyGenerator.java
class.
What might be wrong?
Upvotes: 1
Views: 800
Reputation: 190659
Based on Duncan's answer, I could fix this issue.
impactAnalyzer
Actually I didn't add it manually, but it's already exported, as (I guess) I did it with Quick Assist automatically.
I had to Add com.prosseek.impactAnalyzer
in the dependecies.
I had one more step to do, I had to open run configuration to add required plug-ins
.
When exporting the asttest
plugin, I also had to export impactAnalyzer
also.
Upvotes: 1
Reputation: 3502
If you are running this as an OSGI or Eclipse Application, you need to explicity export packages as available to other plugins as by default they are not. Open your manifest editor in plugin 1. Click on the runtime tab and add the packages as "Exported" then the class loader in blugin 2 will be able to find it.
Also looks like you might be doing the class path configuration wrong. in plugin 2 make sure you add plugin 1 as a dependency in the dependencies tab of the manifest editor. Looks like you are doing a dependency configuration as if it were a regular java application
Upvotes: 3