在代码 window 外部单击时,IntelliJ 将 "this" 添加到本地 class 变量

IntelliJ adds "this" to local class variables when clicking outside of the code window

在某些时候,我的 IntelliJ 开始自动将 this 添加到 class 的最终成员中。

点击代码外部时似乎会发生这种情况 window。

所以它会自动改变

class My{
  private final Dog dog;
  ...
  dog.eat()
}

class My{
  private final Dog dog;
  ...
  this.dog.eat()
}

我怎样才能停下来?

很有可能,您在“提交前”配置部分启用了 Reformat Code, Rearrange Code, or Cleanup。 它会在提交更改之前根据您的代码样式设置重新格式化当前文件。

如果不是这种情况,请检查是否有任何插件可能会在保存时触发此类行为,例如“保存操作”或“swiss-as dev-tools”插件。