these operations were previously in the view. They didn't belong there. There is now a simple helper object (IContextItem) that is used to transfer info from the ViewModel to the View, so the View can build up the menu based on directions from the ViewModel. This should make further ContextMenu extending easier, and now possible to test.
Pull the completion code into a new type.
This is actualy way better organized now. But a lot of code had to move, so I'm not confident that I didn't introduce any bugs.
Some of these methods belonged as extension methods on IDataModel. They're only used in the ViewPort, but don't really do anything ViewPort specific... they act on a Model, with a few parameters. So make them called that way.
For a long time now, MainWindow has housed basically all the xaml for the entire application. It got too big. It now houses all the xaml for the view of the EditorViewModel (basically the viewmodel of the overall appliaction) while the tab content has been moved to a TabView (which has the ViewPort for a viewmodel). The TabView contains the HexElement, along with all the goods that wrap around it (the column/row headers, the address bar at the bottom, various scroll bars, the tools). Several of the methods were able to move from the main window to the TabView.
the theme selector was still a bit confusing, with both a light and dark mode. It's difficult (and not really neccissary) to get them both to look good at the same time. So now there's just one theme, the text is more clear, and I added swatches for selecting the primary text / background colors.
undo seemed to jump around in unexpected ways. The jump is now primarily based on data changes, not format changes. This means that adding/removing a pointer to a table will no longe jump to the table as the primary thing that changed.
model should be able to create new text runs given possible start
locations.
ToolTray should be able to expose errors
PCSTool should be able to expose errors
PCSTool should give messages when the address is incorrect.
PCSTool needs a button to say "dude, this address has text"
Make the ViewModel code that searches for starting text locations in
a span public and static so that the PCSTool can reuse it.