java - 谷歌样式格式
问题描述
我已将这两行添加到我的.vscode/setting.json
文件中以启用格式化功能:
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"java.format.settings.profile": "GoogleStyle"
我正在使用 Eclipse Key Bindings 进行记录。所以当我这样做时Command + Shift + O
,我的 Java 文件中会出现一个小气泡,上面写着:Organize imports
. 但是,当我单击它时,我收到此错误消息:Running the contributed command: '_vscode_delegate_cmd_km72g93j' failed.
。
知道如何解决这个问题吗?
解决方案
我使用的是 Windows,因此组织导入的键盘快捷键是Shift+Alt+O
. 当我按下按键时,导入语句会立即组织起来。再次按 Shift+Alt+O 以显示黄色灯泡并选择 Organize Imports,发生同样的错误。
如果你翻看Log(Extension Host),你会发现导致这个错误的原因是actual command NOT FOUND _vscode_delegate_cmd_kmel0ckh
:
您无需再次单击黄色灯泡并选择组织导入,但这可能是一个问题,我已将其放在 github 中:Organize imports throw the error
推荐阅读
- javascript - 计算JS函数中的值的总和并显示在一行上
- javascript - 当有人在数组中的名称字段上输入空格时,如何使用 JavaScript 返回错误?
- php - wp_reset_query 未重置
- reactjs - Dockerized React 应用程序不重新编译代码
- java - 快速排序算法(java)根本不排序
- rust - 在 const 函数中如何处理 trait 对象?
- r - 按每行中的 NA 数量拆分数据帧
- c# - 集合重命名后,MongoDb 更改流未恢复
- python - 雪花“PARTITION BY”复制选项,包括输出数据集中的分区列
- powershell - 发生奇怪的 Powershell 子字符串/替换问题