microsoft / sarif-visualstudio-extension

SARIF Microsoft Visual Studio Viewer Extension
MIT License
46 stars 19 forks source link

GHAS alert dismissal #557

Closed EasyRhinoMSFT closed 2 years ago

EasyRhinoMSFT commented 2 years ago

Dynamically creating flyout menus and commands in the Error List context menu (and potentially elsewhere) is a necessary capability for the result source services. Unfortunately the VS extensibility SDK doesn't provide a nice API for this purpose.

Because the service projects can't reference the Viewer project, the only way form them to request changes to the Error List context menu is via events. This is the best we can do right now but will improve once we break the Viewer project apart (https://dev.azure.com/mseng/1ES/_workitems/edit/2003961).

Another concession that will improve later: because the services can't reference the Viewer project, they can't know what a SarifErrorListItem is. To mitigate this, the SarifViewerPackage extracts the SarifLog object(s) and provides them to the service's Invoke handler(s). This issue will be resolved when the model classes are moved into a leaf project that can be referenced by both the Viewer and result source service projects.

image