user2560860
user2560860

Reputation: 13

Eclipse RCP plugin - ActivatorClass

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 :

  1. Plugin one is for classes defining application logic.
  2. 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

Upvotes: 1

Views: 185

Answers (1)

greg-449
greg-449

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

Related Questions