We managed to run a generator from a transformation menu (or other editor components), which allows us to inform the user that the result of their specification has changed in a not-backwards compatible way. We prefer doing this via the existing generator because otherwise we need to write and maintain the same transformation code twice (or write our own generator-language as well).
We ran into a problem when running the same generator from a checking rule (to have it detect a breaking change during an explicit Check Project). The generator produces its results with a call to TransientModelProvider.PublishAll(), which needs to be run inside a ModelAccess.runWriteAction(). However, any code (even when started from another thread) within a runWriteAction is ran after the Project Check finishes, which is to late to give the error/warning/info messages to the user. Is there a way to work around this or a better solution?
We believe the generator only writes transient models, which can refer to roots in project models but not the other way around, so it should not interfere with the root/models in the project that is being checked? We only need to inspect one root produced by the generator and compare it with an existing root in the project. Is there a way for the check project thread to not take the lock for writing transient models? Is there a maybe a way to separate the project and transients over different repositories?
Any experiences with this or advice is appreciated. Kind regards, Arjen