Description
In the context of #117873 I was doing a quick research how working copy providers that are text file model based are implemented today and found 2 examples:
- custom text based editors
- search editors
When you look at CustomTextEditorModel
you can see how every IO related method (like save
or revert
) is going into the manager of text file models, e.g.:
This has the advantage that a lot of corner cases for saving are being taken care of that prevent data loss or corruption.
When looking at search editors, I see that a (code editor) model is being resolved or created here:
But the IO logic is all implemented custom, e.g.:
As such, your custom search editor is a good candidate for adopting the text file model approach, similar to custom text editors.
I am inclined to mark this important
because I think you really should not implement the IO logic yourself, but maybe there are no issues with your implementation either, so I leave it as debt
.