小编Eri*_*ric的帖子

如何将 Visual Studio 注释期望与具有 Doxygen 注释的代码相协调?

为 Doxygen 处理编写的代码有这样的行是正常的。

int myVariable; ///< description of myVariable
Run Code Online (Sandbox Code Playgroud)

但是,当 Visual Studio(例如 VS 2015)使用这些 Doxygen 注释准备的代码时,其工具提示信息myVariable将显示

XML comment contains invalid XML: Whitespace is not allowed at this location.

问题似乎是紧跟在“//”之后的“<”的存在。这似乎被 Visual Studio 解释为信号(格式不正确)的 XML 内容。但是,此组合与“<”一起存在,以向 Doxygen 发出信号,表明该注释适用于该行上的前一项,而不是后一项。

假设我们正在讨论已经遵循 Doxygen 约定的现有代码体。很多地方已经这样写了。

有没有办法调整或教授或设置 Visual Studio,以便它将此类注释视为前一项的正常文档注释,以便它们出现在这些项目的工具提示中?

xml comments doxygen tooltip visual-studio

5
推荐指数
1
解决办法
306
查看次数

标签 统计

comments ×1

doxygen ×1

tooltip ×1

visual-studio ×1

xml ×1