mono/monodevelop — pull request #369 by riviti (2013-08-06 15:52:25+00:00)
Title: CodeIssuePad implementation

This is an updated and enabled CodeIssuePad with flexible grouping and the possibility to batch run the fix actions. Also included is support for batch fixing all the issues of a certain type in one file directly from the editor.

Here's a quick overview of how the CodeIssuePad works now:
I decided to avoid holding on to the original CodeIssue and CodeAction instances and instead summarize them and only keep what is useful when displaying the ui (more or less). There are two new classes for this: IssueSummary and ActionSummary. This approach means huge memory savings but also that the original data structures are not around when it comes to fixing the issues.

This is where the BatchFixer comes into the picture: it has to re-run the issue providers and match the IssueSummaries & ActionSummaries to the new instances of the CodeIssues and CodeActions. Currently this is done using the location information.

The IssueSummaries are put into a tree of IIssueTreeNode instances and the ui mirrors this tree structure lazily, as required based on which nodes are expanded.

Known issues:
- The context menu for the results tree is weird, because I haven't quite figured out how to handle it properly in XWT.
- Because the location of issues and actions are used to match the summaries with the real instances, not all issues are fixed when running a second, third, or more set of fixes in batch mode (since the locations change when the previous fixes are applied).
- It is kind of slow when fixing issues. I had hoped that only running a single issue provider would provide a performance advantage the second time the Issue providers are run. This advantage is much smaller that I thought it would be.
- UI updates for very large lists of issues is slow. I think this is a limitation in XWT and/or GTK or both.