Reputation: 13
I am new with Eclipse RCP and I am working on a plugin where I should decouple application logic from User interface and create two new plugins :
There was an images folder on the original plugin and I put it in the UI plugin. Now, I found out that these images were loaded using the Activator Class which I put in the application logic plugin. My problem now is how to load these classes from the UI plugin. Should I create an Activator Class for this plugin ? Is it safe to do it ?
I really need help. Thank you
Upvotes: 1
Views: 185
Reputation: 111217
You can have an activator in any or all of your plugins.
For your UI plugin the activator can extend AbstractUIPlugin
which has an getImageRegistry()
method. The ImageRegistry
can be used to manage images.
The activator for your logic plugin should probably extend Plugin
so that it does not have access to the UI code in AbstractUIPlugin
.
Note: when you create a plugin with the New Plugin wizard the 'This plug-in will make contributions to the UI' option controls which class the activator extends.
Upvotes: 1