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 :
- Plugin one is for classes defining application logic.
- Plugin two is for classes defining user interface.
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
You can have an activator in any or all of your plugins.
For your UI plugin the activator can extend
AbstractUIPlugin
which has angetImageRegistry()
method. TheImageRegistry
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 inAbstractUIPlugin
.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.