I have an existing program we've developed as a large set of Eclipse plugins. One of the plug-ins is responsible for reading internal information and generating an output file that is fed to another system.
This output file's format is fully specified in a controlled document.
Now I need to extend this application to output a newer version of this format, but I don't want to lose the ability to output the old version. The two are similar enough that I could get away with a couple of 'if' statements, but that's not the OO way.
It seems like I should have a new plug-in that provides the new file format, and then somehow uses an extension point to find a plug-in that implements the requested format. One approach would be to make the extension point's name encode the format ID.
Then I have to configure in some fashion which format this particular program wants to use.
Are there any best practices people can suggest? Eclipse is such a large platform that there are dozens of ways to do things and not always a clear winner.