问题标签 [eclipse-formatter]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
122 浏览

java - 在 Java 方法声明中的方法名称后插入换行符

我有一个 Eclipse 风格的 Java 格式化程序(在 VSCode 上)。下面的缩进设置是什么?

  1. 方法名称后的换行符aVeryLongMethod(
  2. 方法声明中挂线的双缩进(args1 前 8 个空格)
0 投票
0 回答
27 浏览

eclipse - 如何在 Eclipse 中格式化块注释时禁用在新行开头插入“*”?

原来的:

不想要的结果:

有没有办法在新行的开头禁用“*”?我猜它是 javadoc 标准的东西,但是当我想取消注释时它会很烦人。

0 投票
0 回答
99 浏览

java - Eclipse 中缺少 java 代码格式化程序?

我有最新的带有 jdk 16 的 eclipse。我有一个我使用的自定义代码格式化程序样式。代码格式化程序似乎已经从首选项|java|代码样式中消失了。相反,我只有首选项|java|代码样式。

我设法导入了一个旧的 .epf 文件,但它似乎没有做任何事情。

有谁知道发生了什么?

有没有办法找到它或重新添加它?

我正在使用devstyle的深色主题。

可能Eclipse 重新启动时删除的 Eclipse 首选项有关

Edit 1: Looking at @LMC's suggestion. Eclipse java code style formatter profile location. I was able to find and import my preferences file, but could still not find "formatter" anywhere. Managed to import my latest preferences from my only .epf file, but that was only 5 lines long. I have many .xml files that are saved preferences. Is there any way to load them? And it looks like that made even more preferences go away.

Exporting preferences does have formatting info. Importing the preferences that I just made gives me the devstyle restart nag.

I still see one page for the each main preference. I will try more experiments. ...

编辑 2:我在不同的目录中安装了 Installer 2021‑06 R 的新副本。似乎所有的偏好都在那里。但是,我没有黑暗主题。看起来它可能是devstyle问题。

编辑3:我安装了光谱黑暗主题,它工作正常。格式化程序选项又回来了,我所有的偏好都出现了。所以不清楚问题是什么。