STS 更新后组织导入快捷方式不起作用

Organize Imports shortcut not working after STS update

安装 STS 3.9.0 的最新更新后,我的 Ctrl+Shift+O 组织导入的键盘不再工作。快捷键存在于 Preferences->General->Keys ("Keys" preferences) but is missing in the Source menu ("Source" menu).

这是一个bug。您可以通过修复 Eclipse 快捷键首选项来解决它。

来自错误报告:

here is how you can fix that issue:

Go to the Preferences -> General -> Keys press Filters... and de-select Filter uncategorized commands. Look for the command "Go To Symbol in File" and select that, press unbind and Apply and Close

另一种在 STS 重启后仍然存在的解决方法是: 首选项 -> 常规 -> 键 并将 "When" 值更改为 'Editing Java Source'。