JPMoresmau/eclipsefp — pull request #83 by yiding (2013-01-11 04:45:56+00:00)
Title: small fix for syntax highlighter in async mode

when highlighting finishes in a different thread, the source code may
have changed in the mean time, making the tokenization invalid. This can
cause coloring to be applied that's off by a few characters, or even
exceptions if the file has been shortened.

This fix discards the tokenizer result if the file has changed by seeing
if there is another queued highlighter job. When continuously typing, newly
typed characters may not highlight immediately. But on the other hand, this
actually makes the async-highlight mode usable for me.

Also use the implicit lock in the SingleJobQueue object for
synchronization instead of creating another object.