Simantics-internal changes not reflected to documents already opened in an External Editor
Corner problem case:
- Open JS file in external editor => opens in e.g. VS Code
- Close VS Code
- Open file in Text Editor, make a change
X
- Reopen JS file in external editor (VS Code)
=> Change X
does not show up in external editor since the system already thinks the file has been written to the workspace for external editing and just uses it
Improvement:
- When opening file in external editor, check the file's cryptographic hash if it matches the hash of the data stored in the graph.
- If not, try to rewrite the data into the workspace storage.
- This will work, if the external editor does not reserve the file and can deal with external changes to open files properly.
- Not all editors, such as MS Office tools will work with this. However, you can't edit office documents in Simantics anyway, so those are only edited in external editors.