While deleting a module if you choose to export it and then subsequently cancel without saving, the module remains and is not Removeable. The option is grayed out and requires a reparse to enable the option again.
Version: 2.1.6535.41637
Status by design?
Sounds more like status missing a failing test ;-)
If the deletion was cancelled, RD state should ideally remain what it was before. Are we too eager to remove the module from parser state?
Hold on - if the yes/no/cancel msgbox is ours, then we can fix it. If it's the VBE's, then it's essentially the same problem as when closing the last host document and then cancelling: the VBE unloads its add-ins and we never get to know about the cancellation... So that would be "by sorry design".
I do not know what the code explorer does, but the parser really does not care whether something got removed directly. There is just a reparse that figures out what is in longer there by comparing the saves modules with those on the projects. So, I guess this is simply a problem about deactivating the command too early.
The problem is resetting SelectedItem whether or not the item was actually removed in ExecuteRemoveComand method in CodeExplorerViewModel class.
So, even if the item was not removed, SelectedItem will become Project folder, therefore Remove command will not be enabled.
Most helpful comment
I do not know what the code explorer does, but the parser really does not care whether something got removed directly. There is just a reparse that figures out what is in longer there by comparing the saves modules with those on the projects. So, I guess this is simply a problem about deactivating the command too early.