Patent Document ID: 7802179
Application ID: 11614240
Patent Status: 1

Claim One:
1. At a computer system including an editor having a text view and a design view for editing documents, the text view configured to receive text representing instructions of a mark-up language, the design view configured to interpret the mark-up language and to render corresponding output, a method for automatically synchronizing the rendered output of the design view with an incremental change made in the text view, the method comprising: an act of storing a text view of mark-up language instructions of a document in a text view buffer; an act of detecting a change in the text view of the document within the text view buffer, the change spanning multiple mark-up language elements within the mark-up language instructions; an act of identifying the type of the detected change from among inserting, deleting, and changing text; an act of identifying an excise region of changed text for the detecting change, the excise region containing a region of changed text that is to be synchronized with the design view, identifying the excise region including: an act of identifying a change start location of the detected change within the text view buffer; an act of identifying a change end location of the detected change within the text view buffer; and an act of determining that the portion of text between the change start location and the change end location is the excise region; an act of identifying a scoped output region, the scoped output region indicating mark-up language elements potentially impacted by the detected change by being at least partially within the excise region based on the level of the mark-up language elements within the mark-up language instructions, identifying the scoped output region including: an act of inspecting the text view buffer from the start change location towards the beginning of the text view buffer to identify a scope start location, the scope start location indicating the beginning of the start tag corresponding to the first mark-up language element at least partially within the excise region; an act of inspecting the text view buffer from the change end location towards the end of the text view buffer to identify a scope end location, the scope end location indicating the end of the end tag corresponding to the start tag at the same level within the mark-up language instructions; and an act of determining that the text from the beginning of the start tag to the end of the end tag is the scope output region; an act of determining that it is safe to use incremental parsing to re-parse the excise region of the document based on mark-up language elements contained in the scoped output region; an act of re-parsing the excise region to generate further mark-up language instructions for insertion into the excise region without having to re-parse the entire document; an act of inserting the further mark-up language instructions into the excise region to implement the detected change; an act of integrating the further mark-up language instructions into a design view parse tree used by the design view to render the document such that the detected change is synchronized between the text view and the design view; and an act of rendering the design view parse tree to represent the detected change from text view within the design view.