Reputation: 1185
I don't know what I did, but what was once working no longer works.
I am calling a function that returns an instance of a particular class, call it MyClass. MyClass depends on another class, MyOtherClass that is defined in a package. This package (call it com.myotherpackage) is contained in a plugin (call it com.myotherplugin) listed in the dependencies section of my plugin manifest. When I call that function, I get the error "The type com.myotherpackage.MyOtherClass cannot be resolved. It is indirectly referenced from required .class file."
What could I have done to cause this error to crop up where previously the error wasn't present and my code ran just fine?
I've searched for solutions. They all seem to focus on non-plugin environments. One such solution had something that I could map to a plugin. It suggested I configure my build path (right click on project -> Build Path -> Configure Build Path). From this dialog, I selected the Libraries tab, clicked the arrow next to Plug-in Dependencies, then clicked the arrow next to com.myotherplugin, then clicked the arrow next to Access rules, and found that there is a checked check box next to the words "Accessible: com/myotherpackage/*". Thus the package appears to be available though I have no information from this view that MyOtherClass is contained in that package.
Any ideas would be appreciated.
Upvotes: 0
Views: 59
Reputation: 1185
I don't like this answer, but reinstalling the IDE did the trick (i.e., unzipping from source). Note that my instance of the IDE comes with com.myotherplugin.
I have no idea what I broke.
Upvotes: 0
Reputation: 696
You have to export com.myotherpackage
in the manifest of com.myotherplugin
. You can do so in the Plug-in Manifest Editor on the Runtime page.
Also Eclipse usually provides a Quick Fix for these kind of errors, which make the required changes in the manifest file.
Upvotes: 1