1
votes

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.

enter image description here

However, when I execute the plugin, I got an error missing CallHierarchyGenerator.java class.

enter image description here

What might be wrong?

2

2 Answers

3
votes

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

1
votes

Based on Duncan's answer, I could fix this issue.

Export packages in impactAnalyzer

enter image description here

Actually I didn't add it manually, but it's already exported, as (I guess) I did it with Quick Assist automatically.

Required Plug-ins

I had to Add com.prosseek.impactAnalyzer in the dependecies. enter image description here

Run configuration update

I had one more step to do, I had to open run configuration to add required plug-ins.

enter image description here

Export the plugin

When exporting the asttest plugin, I also had to export impactAnalyzer also.

enter image description hereenter image description here