aspnet/KRuntime — pull request #767 by jrieken (2014-10-16 09:53:19+00:00)
Title: dth - enable buffer updates outside the file save cycle

There are editing scenarios in which you want the design time host to consider a state of the source text which is not yet saved to disk but still in flux.

* Introduce a source text service which (1) gives you access to source text from a path and (2) allows you to record modifications to source text. Source text modification are either expressed using offset & length, or location spans (start line, start character, end line, end character).
* In order to benefit form Roslyn incremental parsing it extends the cache to give you access to an old cache entry (in case a previous entry with the same key became invalid).
* Last but not least the PR also adds a SourceTextChangeMessage which is processed during the ApplicationContext#Calculate logic.

In addition to the syntax tree for a path, the cache now also contains a source text plus recorded changes and a source text snapshot. The latter becomes invalid whenever a new change has been recorded, and the former becomes invalid whenever the corresponding file changes on disk.

I am unsure of having found the right place where the source text service is instantiated (dth only) and if it lives in the correct project ;-) Please advise.