问题标签 [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 回答
2507 浏览

eclipse - 如何管理非托管 Eclipse 格式化配置文件?

我们的项目有一个“非托管配置文件”和节省时间的自动格式化。我希望能够修改此非托管配置文件的设置,并能够将它们重新签入到版本控制中。

Eclipse 的帮助文档非常无用(“您不能更改这样的配置文件,只有配置文件的创建者(管理员)可以更改它。”)。

0 投票
1 回答
3838 浏览

eclipse - Eclipse Java 格式化程序的命令行

我只是想知道是否有用于 eclipse java 文件格式化程序的命令行工具。或者如果有一个蚂蚁任务来执行它。

在我的场景中,有 2 个 java formatter,一个是 android formatter,另一个是我们内部的 formatter。

所以我们必须在这两个格式化程序之间进行更改。

0 投票
1 回答
448 浏览

java - 使用 java.util.Formatter 作为 slf4j 的默认格式化程序

我目前有一个内部使用的自定义日志管理器java.util.Formatter。主要问题是它不是很有用:每个应用程序都在一个文件中,无法在数据库中添加特定日志,无法发送邮件,......

所以我希望能够增加我们的日志系统的能力。经过几次测试,Log4J 正是我现在需要的。但是我想避免将来再次重新更改它的痛苦,所以我计划在 Log4J 之上使用 slf4j。

即使我准备好在我的所有代码库中进行大搜索/替换以使用 slf4j,我还没有准备好检查每个日志语句并将其重新格式化以使用{}slf4j 的格式。

所以我的问题是:我如何使用 slf4j 接口并告诉它在内部它应该使用 ajava.util.Formatter而不是默认的,最好是在一个地方(意味着不在每个类或包中)?

注意:所有关于表演或声明我不应该使用 juFormatter 的答案都将被丢弃:我需要一个务实的解决方案来解决我的问题,而不是发起辩论。

0 投票
1 回答
776 浏览

php - Zend Studio 格式化程序使用错误的格式

我正在使用ibuildings ZF。当我按 Ctr+Shift+F 时,代码是这样格式化的

但我想这样格式化

如何配置这个?

0 投票
2 回答
6025 浏览

java - Java货币格式化程序:强制使用货币符号进行格式化

我使用spring货币格式化程序根据货币代码格式化一个值

因此,如果我将其称为 format(10, "GBP"),那么无论语言环境如何,我都希望将值恢复为 10.00 英镑。

这可能吗?

0 投票
1 回答
1128 浏览

javascript - javascript格式化程序

是否有一个好的 javascript prettyprinter 来格式化通过最小化器运行的 js 代码?

0 投票
5 回答
19134 浏览

eclipse - Eclipse 代码格式化插件

有人可以建议我使用适当缩进等格式化 HTML 和 JAVA 代码的插件吗?Eclipse 中是否有任何内置选项?

0 投票
3 回答
12120 浏览

java - Java Formatter 不允许换行符?

所以,我有以下代码写入文件:

唯一的问题是,输出没有换行符。

如果我用“\r”替换“\n”也不起作用。

...我不知道为什么这不起作用。输出已创建并正确写入。(我看到创建的文件并且所有内容都写入其中,换行符除外。)

0 投票
1 回答
6057 浏览

jqgrid - jqGrid custom formatter option "unformat" doesnt work

jqGrid custom formatter option "unformat" doesnt work when supplied with function.

I am supplying function to this option. custom formatter example suppose to work but its not working.

My main purpose of having unformat function is to give proper value to the sort function (when you sort by clicking on the sortable column header) which calls unformat and formatter supplied to the colModel.

Here is my code, (all the modules are included for jquery UI and jqgrid.)

I have spend lot of hours to trace the call into grid.base.js and found no way that goes to jquery.fmatter.js where the unformatFunction gets called for every row. My doubt is unformatFunction is not getting called while sorting.

I just confirmed by editing the example, that it is not working, something is horribly wrong. i can't think of any mistakes. its simply dont call the unformat function specified in colModel.

0 投票
2 回答
4500 浏览

php - 在为 gedit 寻找 HTML、CSS、PHP 代码格式化程序时需要帮助

我在为 gedit 寻找 HTML、CSS、PHP 代码格式化程序插件方面需要帮助。我研究了 gmate 和其他插件,但我只能找到 Ruby/Rails 文件的代码格式化程序。