在 Mac 上,使用 Command + . 键弹出“快速修复建议”菜单。
在 Windows 上,使用 Ctrl + . 键。
然后只需选择要应用于您的代码的“快速修复建议”。
Mac 示例:
Ctrl+K Ctrl+I