Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在此处输入图像描述
我正在 eclipse 上做一个 JUnit 项目,请帮我组织导入,因为我使用 checkList 插件。我也尝试了 source +organize 导入,我尝试了 Control+Shift +o,但它们都不起作用。你能帮我吗 。
要启用此功能,请转到 Windows -> Preferences -> Java -> Editor -> Save Actions,然后启用 Perform the selected action on save -> Organize imports。此后,每当您保存 java 文件时,eclipse 都会自动删除未使用的导入。谷歌搜索可能会有所帮助
要解决此问题:
转到 Preferences -> General -> Keys 单击 Filters... 并取消选择 Filter uncategorized commands 然后确定。
然后在文件中查找命令转到符号并选择它。然后点击 Unbind 然后 Apply and Close
Ctrl+Shift+O。现在应该可以工作了。
笔记:
还要取消绑定任何其他冲突的命令,只为Ctrl+Shift+O保留一个命令,并设置何时编辑 Java 源代码。