Added in a listener to detect when a file is modified from outside the
program
https://github.com/processing/processing/issues/1939
Modifed imports to match existing style
Reset to the when forked
Re-added in commit for Pull request
Reduced poll-time to 100ms and exported it to a variable
Added didReload flag to prevent popping up loads of dialogs if a lot of
files were modfied
Increased poll time on reload to 1s
Added boolean reloadEnabled which can be set to false to disable
reloading (currently always true)
Editted checkModified (called if and only if a close is requested) to
check if the close will be successful (i.e. if it will return true)
Added code in checkModified to trigger the stopping of the reload thread
when this editor is closed
Switched from using a thread-based poll system to one that polls when
the window gains focus.
Also un-auto-formatted the code
Now using the correct listener and added reloadEnabled again
Stopped pop-up when the file is saved from within processing
Added a poll of filesystem event on the loss of focus which will catch
if the file has been saved
Merge pull request #2628 from pvrs12/master

File changed detection, Issue #1939