Code52/DownmarkerWPF — pull request #252 by belfryimages (2012-05-04 13:41:19+00:00)
Title: Plugin support

So it basically works like this:

- parts of MarkPad are exposed in MarkPad.Contracts
- plugins are separate assemblies that implement one or more interfaces in MarkPad.PluginApi, they also depend on MarkPad.Contracts but that should be their only dependencies in the ecosystem - everything should be passed in via contracts
- the MarkPad assm references each plugin assm, but they are loaded using MEF in `MarkPad.PluginManager` and be directly references anywhere else
- exception is the spell check extension, language selection is jigged through the existing combo
- The extension points in MarkPad use the plugin manager to compose a set of the plugins they are interested in, and hook them up.

Spell check is implemented as a plugin, but it is really just a manager for the existing spell check code, which is tied to the AvalonEditor control and would be difficult to abstract and separate.

**What is missing:**
- A NuGet gallery was discussed (#151) but there are a number of tricky details like auto-updating NuGet plugins, issues with the nuget.core dll (you need to use a custom build), having a stable plugin API, and setting up the entire ecosystem.
- Need to implement per-plugin settings windows. Probably a shell window that resizes with the content, then the plugin can provide a control to add to the window.
- I haven't tested this with the installer, mainly because I haven't got all the dependencies set up
- probably a number of highly obvious things.