core-5088 5092 fix file save issue and memory leaks
core-5088 make read only files uneditable in the editor
Merge branch 'master' into STABLE