A language-based editor is an editor composed of interacting cells, called placeholders, where the programmer edits his program segments. The placeholders are designed according to a language's syntax and semantics such that the affected part(s) is analyzed (named incremental analysis) when control leaves the placeholder. This paper presents a template-based MVC (TMVC for short) architecture, and extension of MVC, for constructing a language-based editor. A TMVC encapsulates an MVC triad as its component to handle all of the I/O work of a placeholder, and a program is modeled by multiple TMVCs associated with the program tree.
Object-oriented techniques have also been used to construct incremental tools which perform analysis via message passing between TMVCs. Since semantic definitions are usually associated with language constructs which are basically similar in different languages, the (code) class hierarchy for an (corresponding) incremental tool constructed based on language constructs is more reusable and maintainable. Furthermore, an example of integrating an incremental tool into the programming environment shows the extensibility.