开发者

Eclipse JSF editor configuration

When I format my JSF markup in Eclipse (Indigo), I observed that fairly short lines of codes are broken into more lines.

Let开发者_开发技巧 me explain this issue using an example, just look at the following markup:

bgcolor="<h:outputText 
              value="#{formBean.colorPreferences.background}"/>"
text="<h:outputText 
           value="#{formBean.colorPreferences.foreground}"/>

The above markup has been broken into 4 lines (after formatting) but, I prefer the formatted markup to be as follows:

bgcolor="<h:outputText  value="#{formBean.colorPreferences.background}"/>"
text="<h:outputText value="#{formBean.colorPreferences.foreground}"/>

Is there any way to configure the Eclipse editor according to my preference?


Yes, you just need to change the line width for the file type you're interested in to whatever you want:

Window -> Preferences -> Web -> HTML Files -> Editor

And set Line width to whatever you'd like.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜