I'm working on updating the Enhanced Tooltip packge (
https://github.com/MrJul/ReSharper.EnhancedTooltip) for 2016.2 and I've fixed most of the errors from the upgrade to 2016.2, but there's one thing I wanted to check on before I attempt to publish it. There's a block of code that used an
IDocumentMarkup reference to get to the
Context property; that property seems to have been removed from the interface but is still available on the
DocumentMarkupBase, so I rewrote the following line:
ShellLocks shellLocks = documentMarkup.Context.Locks;
as
IShellLocks shellLocks = ((DocumentMarkupBase)documentMarkup).Context.Locks;
This seems to be safe as all the implementations of IDocumentMarkup that I could find inherit from DocumentMarkupBase, but I was hoping if someone could confirm that it's safe or suggest a better way to get the HihglighterContext reference.