Implement grammar locking
Grammars are being cleared and saved in the editor. Make sure that any use and change of grammars makes use of a ‘lock’ attribute. Otherwise e.g. in between clearing and saving, a grammar is neither in the class loader nor in the file system. Hence exceptions might be raised, which are hard to debug due to timing.
(from redmine: issue id 357, created on 2018-01-22tgradl)