project-system
project-system copied to clipboard
Debug properties page doesn't support undo
Unlike the other properties pages, the Debug property page does not support multi-level undo. This means that I make multiple changes to the page I cannot undo them. This is particularly bad because you cannot discard changes due to https://github.com/dotnet/roslyn-project-system/issues/1311, meaning that if you play around with changes and you've not previously committed them to source control - you can't undo them.
I'll take a look a this issue this week end.
I've looked at other property pages to see how the undo/redo were implemeted. Looks like it supported by VS SDK, we don't have to build another command stack:
- IVsProjectDesignerPageSite has APIs to start undo/redo transaction.
- IVsProjectDesignerPage allows the Page to acquire a reference to IVsProjectDesignerPageSite, get/set undo-redo property values.
So I am thinking of having:
- [ ] WpfBasedPropertyPage to implement IVsProjectDesignerPage, providing undo/redo support for WPF pages.
- [ ] Introduce DesignerProperty - properties which support undo.
- [ ] DebugPageViewModel - declare and a list of DesignerProperty for the view model. For instance, it's Profile, Launch, Args, etc..
- [ ] DebugPageViewModel - don't get/set properties directly. Use DesignerProperty.
Any thoughts/recommendations? - Cheers,
@davkean, @BillHiebert, @jmarolf ?
This is a big usability issue.