Code_FAQ, version 7 authored by Anonym's avatar Anonym
Modify a model programmatically
===============================
Say you want to do:
myModel.setParameter(42);
Then you should actually write:
ITopLevelElement modelContext = IPersistencyService.getInstance().getTopLevelElementFor(modelElement);
modelContext.runAsCommand(() ->
myModel.setParameter(42)
));