User forums > Using Code::Blocks

Files modified externally not refreshed

(1/3) > >>

jumafra:
Hello,

I have some post-build commands that create/replace a log file which I have open on C::B editor.
After build process ends, the file isn't refreshed/reloaded, unless C::B looses and regains focus.
Would it be possible to have it reload files which are modified externally immediatly?
Regards,
Juan.

edit:
Using Rev 4820 on WinXP SP2

MortenMacFly:

--- Quote from: jumafra on January 16, 2008, 11:33:50 pm ---Would it be possible to have it reload files which are modified externally immediatly?

--- End quote ---
This is rather unlikely.
Becasue that would require polling all files "permanently" for modification. I guess that's not desired. Currently the modification check is bound to when the editor gets activated again. At that time it's most likely the user wold like to really modify the file. So to avoid conflicts the question is raised there at minimal (computing) cost.

MortenMacFly:
Anyways: I guess it could be easy to implement as a plugin - something like a menu entry "refresh all open editors". A very simple (5-liner or so ;-)) C::B plugin.

jumafra:

--- Quote from: MortenMacFly on January 17, 2008, 01:19:25 pm ---Currently the modification check is bound to when the editor gets activated again.

--- End quote ---
Right now C::B itself has to loose focus for the file(s) to be refreshed. Wouldn't it be better to poll open files when switching editor tabs?.

thomas:
That might work, but then we'd probably have people working on notebooks complain that the CPU fan spins up every time. Not sure.

Navigation

[0] Message Index

[#] Next page

Go to full version