Script files (for Scripting) are being locked the most time by OmegaT (at least under Windows).
This makes editing scripts by external editor (Notepad, IntelliJ IDEA or anything) difficult while OmegaT is running.
I think that the lock-free approach would be a good for script-coders (incl. me).
FYI, they are not locked under Linux
--
Kos
Are you sure they are locked?
Under Windows, the issue may be "simply" because the default script folder is in Program Files, in which it is forbidden to edit a file.
My script folder is somewhere else, and I don't remember having a script locked.
Didier
Kos, thank you for the input.
It seems I run into a platform dependent issue. :(
I tried run OmT with Oracle JRE7 and JRE8 but both gave me the same result.
Sometimes I can save my script changes in the external editor first time, but I rarely can save it 2nd time.
Didier, my script folder is always inside OmegaT user profile folder.
If you don't remember having a script locked, maybe my PC settings has something wrong.
I managed to reproduce it, at least partially. What I did:
- ren scripta.groovy to test.groovy (no problem, and there is no more a scripta.groovy)
- ren test.groovy to scripta.groovy (message telling me the file is locked)
I don't think the lock is intentional, perhaps more a consequence of the directory monitoring.
Didier
Didier, thank you for the time.
Yes, that is what I encountered.
I should revise my first post.
Actually, there seems be the matter of chemistry/compatibility with editors.
Notepad.exe seems be almost fine.
But my main editor Mery (http://www.haijin-boys.com/wiki/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8) almost failed to save changes with OmegaT running situation.
Also jEdit (https://sourceforge.net/projects/jedit/) has the same issue in this area.
I can save my changes in jEdit once, but failed to save 2nd time.
I don't know if this should be called a bug. Feel free change the category if you feel it fit to.
I commited a possible fix for this issue. Apparently the script could be kept locked by the scanner used for reading the title/description of the script.
Since I didn't manage to get the scripts locked every time before, I'm not sure this fix releases all the locks, but at least, I can't reproduce the problem now.
Briac, Thank you! Now I can save my changes as many times as desired with my editor. That's nice. :)
Ticket moved from /p/omegat/feature-requests/1090/
I have moved to bugs and edited the title for clarity.
Didier
Last edit: Didier Briel 2015-05-15
Fixed in the released version 3.5 of OmegaT.
Didier