Context
We want to move away from synthetic LDRs. So instead on depending on (main) ve.dm.MWReferenceNode to be part of the document we want to retrieve content and ve.dm.InternalItemNode directly from the InternalList.
The ve.dm.MWReferenceModel is already an abstraction which hides the MWReferenceNode and is used to edit the nodes in the MWReferenceEditPanel, so we should be able to use this class to also work with a sub-ref that has no distinct main reference node with the main content.
Task
The edit panel used in the MWReferenceDialog works with a MWReferenceModel object that's created from nodes currently. Originally the MWReferenceModel just reflects a node with one document for the content.
- Expand MWReferenceModel to work with content and mainContent of sub-refs
- Allow MWReferenceDialog to work on sub-ref nodes in a mode where the main content is edited
- Route the entry points from the ContextMenu and ReferencesList to the MWReferenceDialog
Notes
Currently editing is happening around the MWReferenceModel class. So we always have to create that class from whatever we want to edit. At the moment we assume that we're coming from a MWReferenceNode and then convert that into a model.