I'm working on Roslyn plugin to Visual Studio. I am trying to subscribe to an event that would be raised after a file is renamed. I am using Workspace.WorkspaceChanged but it doesn't raise DocumentRemoved.
- Shouldn't WorkspaceChanged (with Kind=DocumentRemoved) be raised after an item is renamed?
- Is there any other way to get notifications about solution item renames? I was trying to subscribe to DTE events but no luck either.
This is the way how I get a workspace:
var componentModel = (IComponentModel)serviceProvider.GetService(typeof(SComponentModel));
_myWorkspace = componentModel.GetService<VisualStudioWorkspace>();