自定义评论渲染 - Visual Studio

时间:2016-02-28 06:38:00

标签: visual-studio visual-studio-2015 comments

在Visual Studio(2015)中,是否可以使用自定义标记或指示符更改注释中的行的颜色/字体,如文本编辑器中所示? IE的方式类似于如何分配任务列表项目并由用户自定义标记化识别。

例如:

/*  --- Explanatory Comment ---

<>  This token is recognized, and the rest of this line appears in orange color.

<1> As a result of the token, this line now appears in a different font.
        + Additional information about the above; the text is light grey.

<?> This line appears in bold (and indicatively curious) blue text.

<!> Extra points, pending the possibility of the aforementioned that the
    remainder of the text in line with first character of this paragraph 
    also conforms to the style as defined by the token preceding it.

*/
  • MSDN文档似乎表明创建了&#34; 自定义    类别和显示项目&#34;可以实现(增加    一个VSPackage?),使它们出现在显示选项中    IDE选项中环境下的字体和颜色框    菜单(选项&gt;环境&gt;字体和颜色)。
  • 或通过&#34; IVsFontAndColorDefaultsProvider界面的某种方式&#34;。

是否有一些已知的和/或预先存在的方式来完成前面描述的渲染或更好的替代(类似)解决方案?如果以上是解决方案,任何有关其实施的见解都会非常感谢。提前谢谢。

*注意:我的意图是在我自己的VS文本编辑器中进行视觉增强(可能是带有包的其他人),以便在评论中的分层组织有益的情况下清晰起见;渲染以单独补充ASCII字符。

MSDN文档:

Implementing Custom Categories and Display Items

IVsFontAndColorDefaultsProvider Interface

0 个答案:

没有答案