I have a Roslyn code analyzer that takes a lot of time to run, so running it either at compilation start or as a whole tree analysis is not appropriate.
Instead I would like to have the analysis trigger when the user clicks on a button in the menu (or toolbar/keyboard shortcut).
Is this possible? If not, is there a way for a traditional MEF extension to access the Roslyn tree of an opened document and to add errors/warnings to the Error List and corresponding squigglies under the syntax nodes in the document?