Hi, I am doing some git operations outside MPS. The editor keeps showing the old contents, so I need a way to force MPS to re-read the model(s) from disk. I am using `StoreReloadManager.getInstance()...

This is an auto-generated question from the MPS Slack community: Hi, I am doing some git operations outside MPS. The editor keeps showing the old contents, so I need a way to force MPS to re-read the model(s) from disk. I am using `StoreReloadManager.getInstance().reloadProject(mpsproject);` but that closes the MPS window and show the open project dialog. Is there a way to do this without closing the MPS window?
6 comments
Comment actions Permalink
simple F5 on the logical view does not work? Which MPS-Version are You using?
0
Comment actions Permalink
F5 might work, but I need this to be done programmatically after calling the external git operations. I do an update all open editor as described by Sergej: and . That is not working, I guess because up[dating the editors does not reload the models from disk.
0
Comment actions Permalink
Slack user:UA18Y9VQR> this is the code that's executed by the 'Reload All from Disk' action, perhaps it will help: ```FileDocumentManager.getInstance().saveAllDocuments(); SaveAndSyncHandler.getInstance().refreshOpenFiles(); VirtualFileManager.getInstance().refreshWithoutFileWatcher(true);```
0
Comment actions Permalink
Tnx,I’ll try these.
0
Comment actions Permalink
Slack user:U6K3FGW3U> Tnx, this works perfectly well.
0
Comment actions Permalink
This is auto-generated question from the MPS Community Slack Workspace. If you want to comment on the question, do it from the Slack workspace
0

Post is closed for comments.