【问题标题】:Google Style formatting谷歌样式格式
【发布时间】:2021-03-17 15:42:25
【问题描述】:

我已将这两行添加到我的 .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.

你知道如何解决这个问题吗?

【问题讨论】:

    标签: java visual-studio-code formatting vscode-settings


    【解决方案1】:

    我使用的是 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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-12
      • 1970-01-01
      • 1970-01-01
      • 2021-05-03
      • 1970-01-01
      • 2020-04-28
      • 1970-01-01
      相关资源
      最近更新 更多