This project is read-only.

Context/RelatedDocuments API

Topics: APIs
Sep 4, 2014 at 3:07 PM
Hi, what is the point of "context" documents and the RelatedDocuments API? The source code has little to no comments in that part, public functions like SetDocumentContext etc. (which I'm supposed to implement in my Workspace) don't even have a summary.

As far as I understand it "related documents" allow to associate multiple DocumentIds with one SourceTextContainer (aka text buffer) and one of these DocumentIds can be marked as "context document" (also called "active document" in some places).

As far as I can tell all documents opened on the SourceTextContainer will subscribe to the change event and update themselves when the SourceTextContainer raises its change-event. Why would anyone need multiple distinct DocumentIds opened into the same text buffer, all being updated with the same text? What's the point of that functionality? Am I missing anything?