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
Sort by
Date
Votes
simple F5 on the logical view does not work? Which MPS-Version are You using?
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.
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);```
Tnx,I’ll try these.
Slack user:U6K3FGW3U> Tnx, this works perfectly well.
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
Post is closed for comments.