A Source object represents the entire source file associated with a particular view. Information about the source file can be obtained from this class. However, the primary functionality of this class is to handle parsing operations on the source in support for IntelliSense operations and source file-specific editing operations such as adding comments to and removing comments from blocks of code and reporting parsing errors.
Notes to Implementers:
The base class supports all of the IntelliSense operations in coordination with methods on the LanguageService class (these are detailed in the Source class's method descriptions). If you:
support different comment delimiters other than the standard C#/C++ delimiters,
reformat code,
and/or
support advanced functionality for hidden regions (monitoring change of state, ensuring a span is visible, and marker-oriented context menu commands),
you must derive a class from the Source class and instantiate your class in CreateSource.
Notes to Callers:
This class is instantiated by a call to the CreateSource method. This is done when the CodeWindowManager object is instantiated (the Source object is passed to the CodeWindowManager constructor). A Colorizer object can be instantiated and passed to the Source class's constructor.