摆脱无聊的太空日食产生,当你打开一个EL前pression [英] Get rid of that silly space eclipse generates when you open an EL expression

查看:126
本文介绍了摆脱无聊的太空日食产生,当你打开一个EL前pression的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Eclipse中使用EL前pression,我很自然地通过键入开始 $ {。 Eclipse的,想帮助一点,放置一个右括号} 之后。然而,有在它们之间的空间中。所以,如果我想要 $ {user.name} I型 $ {,后跟用户。名称,但我的最终结果是 $ {user.name} - 这额外的空间驱使我逼疯了。

我已经通过所有的菜单看了看,找不到在哪里这个定义。显然,我没有经过足够好看起来,因为它是在那里。我怎样才能消除......不,铲除的,这个空间?

我的Eclipse的信息:

 版本:朱诺服务版本2
建立ID:20130225-0426


解决方案

创建XML

 <?XML版本=1.0编码=UTF-8&GT?;
&所述;配置版本=1>
<配置文件名称=customStyle版本=1>
<设定ID =org.eclipse.jdt.core.formatter.yourMatchingConstant值=不插入/>
< / profile文件>
< /型材>

查找<你一个常数href=\"http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/formatter/Default$c$cFormatterConstants.html\"相对=月食nofollow的>默认code格式常量替换 yourMatchingConstant 与中详见上面的XML文件。

然后导入此XML在preferences - >爪哇 - > code类 - >格式化

When I use an EL expression in Eclipse, I naturally begin by typing ${. Eclipse, wanting to help out a little, places a close brace } afterward. However, there's a space between them. So if I want ${user.name} I type ${, followed by user.name but my end result is ${user.name } - that extra space drives me bonkers.

I've looked through all the menus and cannot find where this is defined. Clearly I haven't looked through well enough, because it has to be in there. How can I eliminate... no, eradicate, this space?

My Eclipse info:

Version: Juno Service Release 2
Build id: 20130225-0426

解决方案

Create XML like

<?xml version="1.0" encoding="UTF-8"?>
<profiles version="1">
<profile name="customStyle" version="1">
<setting id="org.eclipse.jdt.core.formatter.yourMatchingConstant" value="do not insert"/>
</profile>
</profiles>

Find your constant in Default code formatter constants of eclipse Replace yourMatchingConstant in above XML file with found.

Then import this XML in Preferences --> Java --> Code Style --> Formatter

这篇关于摆脱无聊的太空日食产生,当你打开一个EL前pression的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆