Microsoft.VisualStudio.Package.Source
表示一个源文件并且控制对文件的解析操作, 它的实例表示联合了特定view的源代码文件, 关于文件的信息能够从这个实例得到. 但是,这个类的主要功能是去处理源代码的解析操作以便支持IntelliSense和特定文件的编辑操作: 从代码块中添加/去处注释, 报告解析错误.

基类和 LanguageService class的方法同样支持所有的IntelliSense 操作.
如果想支持如下的操作,则必须从此派生一个类, 在LanguageService.CreateSource 方法中实例化.
1.支持不同于C++/C#的注释分隔.
2.重格式化代码.
3.支持隐藏区域的高级功能.

此类在LanguageService.CreateSource 方法中实例化.这个操作在 CodeWindowManager 类被实例化时完成 (the Source object is passed to the CodeWindowManager constructor). A Colorizer object can be instantiated and passed to the Source class's constructor.


IVsSimpleObjectList2 接口, IVsObjectList2 接口的简单版本; IVsLiteTreeList接口的扩展版本, 提供与项目中符号相关的附加方法
此接口的实例由IVsSimpleLibrary2接口的GetList2方法返回.

AuthoringScope Class


IVsColorableItem Interface
为自定义可着色项目提供默认的字体颜色,样式,和名字信息(局部化的). 从language service中返回此接口的实例. 如果要支持high color values,附加实现IVsHiColorItem 接口.

An IVsColorableItem object can be obtained by calling the GetColorableItem method on the IVsProvideColorableItems interface.

Microsoft.VisualStudio.Package.TokenType
标识从language service scanner中返回的不同类型的标记.






posted on 2008-04-28 11:20  BlueTzar  阅读(697)  评论(0编辑  收藏  举报