Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Tom Witmer
Eclipse Source Formatter rules?
May 19, 2010 8:10 AM
Answer

Tom Witmer

Rank: New Member

Posts: 22

Join Date: July 27, 2009

Recent Posts

I'm using Eclipse (latest) to do some Liferay customization. However, I don't know what source formatter rules to use so my code matches the "Liferay style". I've searched the forums, documentation, and wiki but no luck.

If there are no Eclipse formatter rules, is there any other kind of tool that would format my customized code into the Liferay style? Or is this all freeform?

I'll keep experimenting with some settings to see how close I can get. I'll post the settings here if it's good enough and there's interest.
Tom Witmer
RE: Eclipse Source Formatter rules?
May 19, 2010 8:35 AM
Answer

Tom Witmer

Rank: New Member

Posts: 22

Join Date: July 27, 2009

Recent Posts

Well of course after posting this, I finally find something (via google): http://www.liferay.com/community/wiki/-/wiki/Main/Liferay%20Development%20Style#section-Liferay+Development+Style-FormatSource

There's a link to an Eclipse formatter in here, although I'm still seeing a lot of differences, so something is still off. I'll continue tweaking from here to see if I can get it any closer, but again I'd prefer to have the real formatter rules, if such exist.
Tom Witmer
RE: Eclipse Source Formatter rules?
September 6, 2012 2:55 PM
Answer

Tom Witmer

Rank: New Member

Posts: 22

Join Date: July 27, 2009

Recent Posts

Just to close this out completely... looks like there's an Ant target in the hook projects for formatting code to Liferay spec, but since we've transitioned from an EXT project to a hook, matching the Liferay code style isn't important any more.