I've written an Eclipse plugin that depends on version 1.0 of another plugin (let's call it WidgetMaster). Now, version 2.0 of WidgetMaster has been released with interface changes on many of the classes I was using. How can I continue to maintain one version of my plugin while supporting both versions of WidgetMaster?
So far what I've come up with is:
- Create my own interface for all the functionality provided by WidgetMaster. This means I'd also have to create wrappers for all of their types I was using, which is a lot.
- For each supported version of WidgetMaster, create a Fragment project that implements my interface and all the wrapper classes in terms of that version's API.
This is going to be a significant amount of work because I currently use WidgetMaster classes throughout my plugin code. If I will only be depending on a specific version of WidgetMaster from my Fragment projects, I will have to move and wrap all of that. Also, 99% of the wrappers will be the same from version to version but I'll still have to copy them to each Fragment.
Is this the right approach or is there a better way to handle this situation?