ReSharper C++ 与 Visual Assist

本文说明 ReSharper C++ 与 Whole Tomato 的 Visual Assist 之差异。

由于两款产品都在积极地开发中,它们的功能会定期发生变化,此比较只针对比较表的标题中显示的这些特定版本。

如果您在表中发现不准确的条目,请在下方留下意见告知我们,我们将尽快更新此表。

Visual AssistVisual Studio 2019 + Visual Assist Build 2341
Visual Studio 2019 + ReSharper C++ 2019.2

支持的 Visual Studio 版本

Visual Studio 2019 Visual Studio 2019
Visual Studio 2017 Visual Studio 2017
Visual Studio 2015 Visual Studio 2015
Visual Studio 2013 Visual Studio 2013
Visual Studio 2012 Visual Studio 2012
Visual Studio 2010 Visual Studio 2010
Visual Studio 2008 不支持
Visual Studio 2005 不支持
Visual Studio .NET 2003 不支持
Visual Studio .NET 2002 不支持
Visual C++ 6.0 不支持

支持的 C/C++ 规范

C/C++ C/C++
C++/CLI C++/CLI

代码问题检测

高亮显示错误输入的符号 高亮显示未解析的符号
在代码问题之间导航(工具窗口、编辑器) 在代码问题之间导航(工具窗口、编辑器、专用命令)
21 项 Clang-Tidy 检查 264 项集成 Clang-Tidy 检查
无匹配功能 652 项集成 Clang-Tidy 诊断
无匹配功能 87 项集成 Clang Static Analyzer 检查
拼写检查 拼写检查
高亮显示不匹配的分隔符 无匹配功能
无匹配功能 不一致的命名
零常量可由 nullptr 替换 零常量可由 nullptr 替换
不使用“override”说明符重写函数 不使用“override”说明符重写函数
shared_pointer/unique_pointer 的构造函数可由 make_shared/make_unique 替换 使用智能指针的构造函数,取代它的 make 函数
无匹配功能 180 多项专有代码检查
无匹配功能 适用于大多数编译器错误和某些警告的代码检查
无匹配功能 异步搜索任何范围内的代码问题
无匹配功能 从命令行运行代码检查

代码问题的快速修复

根据用法创建 根据用法创建
添加 #include 导入全局变量、类型、类型定义、函数、宏
创建声明 创建声明
修复 case 无匹配功能
10 多个适用于可配置检查的快速修复 120 多个适用于可配置检查的快速修复

编码辅助

高亮显示匹配的分隔符 高亮显示成对的项(包含宏和 printfboost::format 中的格式参数)
高亮显示当前行 高亮显示当前行
首字母缩略词/速记 CamelHumps
建议列表/智能建议 使用智能建议的代码补全
将点转换为 -> 将点转换为 -> 以及将 -> 转换为点
智能选择 扩大/缩小代码选择 + 选择包含的声明
多个剪贴板 包含项预览的剪贴板历史记录
参数信息 参数信息
无匹配功能 编辑器提示
增强的语法着色(6 种不同的标识符)/斜体的稳定符号/粗体的局部符号 语法高亮显示 (20 种不同的标识符)
为光标下的符号高亮显示引用 高亮显示文件中的用法
包围选择 利用行或块注释包围/利用行或块注释添加注释
自动插入结束标记 自动插入匹配的分隔符和格式
快速信息和文档 语法高亮显示的工具提示和文档
按 Enter 时自动展开多行注释 按 Enter 时自动展开多行 /**//// 注释
在 m 之后插入下划线,然后按 Shift 无匹配功能
增强的列表框 无匹配功能
高亮显示匹配的词(代码和注释) 无匹配功能
列(右边距)指示器 无匹配功能
排列行 无匹配功能
插入路径 无匹配功能
从注释预览文件 无匹配功能
重置编辑器缩放 无匹配功能
无匹配功能 复制当前行或选择
无匹配功能 后缀补全
无匹配功能 后缀模板
无匹配功能 快速文档
无匹配功能 自动高亮显示函数出口

代码样式辅助

粘贴后格式化(格式化规则继承自 Visual Studio 在任何范围内应用格式化规则(使用 ReSharper C++ 自有的广泛格式化规则集)
无匹配功能 从现有代码学习格式化规则
无匹配功能 EditorConfig 支持
无匹配功能 Clang 格式支持
无匹配功能 应用代码样式,使用代码清理在任何范围内移除代码冗余
无匹配功能 可配置的文件头样式
无匹配功能 包含预定义方案(STL、Google、LLVM、CamelCase、Microsoft)的可配置命名样式
无匹配功能 适用于生成代码中 constvolatile 修饰符的可配置样式
无匹配功能 适用于生成代码中 include 指令的可配置样式
无匹配功能 适用于生成代码中的默认指针初始值设定项 (0|nullptr|NULL) 的可配置样式

重构和代码转换

访问重构命令 Refactor this
Rename Rename
Change signature Change signature
Introduce Variable Introduce Variable
Encapsulate Field 封装字段(通过 Generate getters and setters 操作)
Extract Method Extract Method
Add braces/Remove braces Add braces/Remove braces
Rename Files Rename File
Move Implementation to Source File Move implementation out of class scope
Move Implementation to Header File / Class Declaration 无匹配功能
Move Selection to New File 无匹配功能
Snippets for Refactorings(可编辑) 无匹配功能
Convert Between Pointer and Instance 无匹配功能
Simplify Instance Declaration 无匹配功能
无匹配功能 Introduce Field
无匹配功能 Inline Variable
无匹配功能 Introduce Namespace Alias
无匹配功能 Introduce typedef/Inline typedef
无匹配功能 向函数增加 = default= deletepurevirtual 说明符
无匹配功能 Convert ?: expression to if statement 和 Convert <0>if statement to <0>?: expression
无匹配功能 Convert #include directive from angle-bracket to quoted form 和 Convert <0>#include directive from quoted to angle-bracket form
无匹配功能 Convert a typedef declaration into an alias declaration 和 Convert an alias declaration into a typedef declaration
无匹配功能 转换为嵌套命名空间定义
无匹配功能 Convert to regular return type 和 Convert to trailing return type
无匹配功能 创建派生类型:类、接口、结构、接口类、接口结构、引用类、引用结构
无匹配功能 翻转关系运算符
无匹配功能 Flip operator arguments
无匹配功能 通过构造函数形参初始化字段
无匹配功能 Invert if statement
无匹配功能 Merge nested if statements
无匹配功能 对逻辑表达式求反
无匹配功能 Remove braces
无匹配功能 将 'auto' 替换为显式类型声明
无匹配功能 Replace decltype
无匹配功能 将 'decltype(auto)' 替换为显式类型声明
无匹配功能 Split declaration with multiple declarators 或 Join declarations
无匹配功能 替换宏调用
无匹配功能 替换模板类型别名
无匹配功能 显式指定模板实参
无匹配功能 Substitute typedef 和 Substitute typedef and all nested typedefs

代码生成

Implement Interface / Virtual Methods Generating overriding members / Generating overriding members
Create Implementation Generate implementation + Generate inline implementation
Create Method Implementations Generating definitions
Add Missing Case Statements Generate missing case statements for enum
Document Method Document symbol
Add Forward Declaration Add Forward Declaration
Add Member 无匹配功能
Add Similar Member 无匹配功能
无匹配功能 生成构造函数
无匹配功能 Generate copy and move operations
无匹配功能 Generate getters and setters
无匹配功能 Generate equality operators
无匹配功能 Generate relational operators
无匹配功能 Generate stream operations(包括 Boost.Serialization 函数)
无匹配功能 Generating hash function
无匹配功能 Generating swap function
无匹配功能 Generating Google Mock Methods
无匹配功能 Convert enum to string (generate enum-to-string helper)(可配置)
无匹配功能 创建派生类型

代码段/模板

VA 代码段 30 个内置实时模板 + 自定义实时模板
使用代码段包围 19 内置包围模板 + 自定义包围模板
Create File (对于标头和 cpp,需要调用两次) 适用于类和结构的内置文件模板(同时创建标头和 cpp)+ 自定义文件模板
代码段中的保留字符串/环境占位符 代码模板中的宏
代码段编辑器 模板编辑器
从选择创建代码段 从选择创建实时模板
无匹配功能 多文件模板

导航和搜索

转到声明(使用 Goto Go to Declaration(可感知用法)
转到实现(使用 Goto Go to Implementation
VA Outline 文件结构
最近的文件(VA View) 转到最近的文件
Open File in Solution Go To File
Find Symbol in Solution Go to symbol
GoTo Related Go to Related Files
GoTo Member Go to file member
Move Scope 转到下一个/上一个成员
Find references 查找用法
Find by Context Go to Next/Previous Highlight/Find Results 窗口
Open Corresponding File Switch Header/Source
Navigate Back and Forward 在导航历史记录中移动
VA Hashtags 书签
源链接 包含外部 URL 模式的待办项
List Methods in File 无匹配功能
VA Navigation Bar 无匹配功能
Hovering Class Browser 无匹配功能
Output 窗口中高亮显示项目文件 无匹配功能
高亮显示查找结果 无匹配功能
无匹配功能 Search Everywhere
无匹配功能 Go to Text
无匹配功能 转到最近的编辑
无匹配功能 转到上一个编辑
无匹配功能 Navigate To
无匹配功能 转到基本符号
无匹配功能 转到派生符号
无匹配功能 转到符号类型
无匹配功能 转到附近的文件
无匹配功能 类型层次结构
无匹配功能 includes 的层次结构
无匹配功能 转到主要模板/专用化
无匹配功能 在 Solution Explorer 中定位当前文件
无匹配功能 查找操作和设置
无匹配功能 断点导航和工具窗口
无匹配功能 包括分析器

调试

步骤筛选器 步骤筛选器
暂时禁用已启用的全部断点 无匹配功能
暂时将所有断点绑定到当前线程 无匹配功能
无匹配功能 内联监视
无匹配功能 可搜索的 DataTips

Unreal Engine

UE4 项目支持 UE4 项目支持
UE4 反射说明符的智能建议 UE4 反射说明符的代码补全
无匹配功能 UE4 反射说明符的快速文档
UE4 远程过程调用支持 UE4 远程过程调用支持
无匹配功能 UE4 RPC 函数的 Rename 和 Change Signature 重构
从导航中排除引擎源 无匹配功能
无匹配功能 推迟引擎代码的索引编制
无匹配功能 UE4 命名约定支持
无匹配功能 UE4 专用代码检查

单元测试

无匹配功能 Google TestCatch 2.5Boost.Testdoctest 框架的单元测试辅助

设置管理

导入/导出设置 设置和自定义模板自动多层同步