It seams to be impossible to make node changes from a non-gui thread in JetBrains MPS 2018.1.4 (Build #MPS-181.1404, built on May 23, 2018)
My (non-generated) code runs in a arbitrary (non-gui) Java thread using the mps.openapi.
1) repository.getModelAccess().runWriteAction(...) does not work (anymore) because MPS gives you the following exception:
jetbrains.mps.smodel.IllegalModelChangeError: registered node can be modified only inside a command or during model load
2) repository.getModelAccess().executeCommandInEDT(...) does not work because MPS gives you the following exception:
java.lang.UnsupportedOperationException: GlobalModelAccess does not support actions which require a command to run. One needs a project to run such actions (@see ProjectModelAccess).
In both cases this is in conflict with the documentation in the mps.openapi.
What is the meaning of a write action if you cannot make a change in it?
Is it impossible to make node changes using GlobalModelAccess?