How to share common functionality between two Eclipse plugins?

76 views Asked by At

I have two Eclipse refactoring plugins that share quite a bit of functionality and I would like to factor them out. What is the best way to do this in Eclipse? Do I simply create a jar file that I share between the two plugins or do I create a third (common) plugin and have the other two plugins extend that plugin? The only problem I see with this latter approach is that the common plugin doesn't have any sort of functionality available to the user (i.e., no UI).

1

There are 1 answers

4
nitind On BEST ANSWER

The only problem I see with this latter approach is that the common plugin doesn't have any sort of functionality available to the user (i.e., no UI).

That's not unusual, and you've already come up with the right approach (although it's to require the new one as a dependency, not extend it if I'm reading your question right).