HTML formatter for Eclipse

821 views
Skip to first unread message

Christian Jensen

unread,
Mar 11, 2011, 12:54:56 AM3/11/11
to play-fr...@googlegroups.com
Hi guys,

I have poked around a bit and I miss being able to hit ctrl-shift-f to unsloppy my code.

Is there something in the works or a workaround I am missing?

Thanks!

McKinley1411

unread,
Mar 11, 2011, 1:29:59 AM3/11/11
to play-framework
I am developing an alternate template system for Play that has full
IDE support for Eclipse, Netbeans and IDEA. The editors (not developed
by me) are already finished for full formatting of code and HTML. Code
completion for HTML and code is also supported. The reason I am
creating this template system is because of IDE support. My method
will result in IDE support faster than what is likely possible for
other template systems.

I need to finish the template integration with Play to a level of
support that Play developers would expect. This includes providing
references to the implicit objects in the templates and template
inheritance. When that is finished I will make a release and
announcement.

My template system will have some differences with standard Play
templates. The templates will be static and compiled. The language in
the templates will be Java not Groovy. The template system may not
support the Play tags system, but I'll try. Some sort of custom tag
system will be supported at some point after the first release.

I'll make an announcement at http://twitter.com/#!/rrmckinley if you
care to check there in the next couple weeks.

Cheers,

McKinley

Christian Jensen

unread,
Mar 11, 2011, 1:49:22 AM3/11/11
to play-fr...@googlegroups.com, McKinley1411
That is great news!

If I may - my $0.02

If you use the Django templating system, you can migrate Django users like me over much faster. I hate the speed of Python and that is what led me to Play!

You would also be able to "repurpose" the pydev code formatters which are decent (not fantastic)

Lastly - you did not mention what you are starting with, but if you want to get the other side (the dark side) you may want to consider using Razor as a starting point. http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx

I REALLY like the concept of java based compilation (reminds me of JSP) - http://krzychukula.posterous.com/jvm-languages-speed-test-java-vs-scala-vs-gro

In this age of green - the more I can get my machine to do with less power the better (less machines = less power) The Django app I maintain takes 3 web servers but should only take one if written in Java.

If you can dump out the Java from the template so developers can see what is being generated, I am certain performance can be tweaked even more!
Tthanks!



--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.




--
Christian Jensen
2200 Panorama Drive #40
Port Moody, BC V3H 5M2
+1 (778) 996-4283
chri...@jensenbox.com
http://www.jensenbox.com
http://www.linkedin.com/in/cjensen
http://twitter.com/jensenbox

McKinley1411

unread,
Mar 11, 2011, 2:49:46 AM3/11/11
to play-framework
I think that you are anticipating the nature of my solution almost
completely correctly. However, the IDE side of my template solution is
pretty well set, so I cannot match just anything like Django on the
first release. In the future it will be possible to add wider parsing
support to the IDE side of the template system.

Yes, Java code will be generated which can be inspected and a class
loader will be added in the future to skip the code generation step.

Razor looks interesting. The code generator of my template system will
allow for definable parser tokens. Razor makes me think that a
valuable set of tokens might be one that enters with a single
character like @ and ends with the end of line (or word) or a { and
reenters and closes with a }. That is a neat trick that really cuts
down on the extra control characters. However, it would take time to
add support to IDEs and supporting all IDEs is my primary goal.

Thanks,

McKinley

On Mar 10, 10:49 pm, Christian Jensen <christ...@jensenbox.com> wrote:
> That is great news!
>
> If I may - my $0.02
>
> If you use the Django templating system, you can migrate Django users like
> me over much faster. I hate the speed of Python and that is what led me to
> Play!
>

grandfatha

unread,
Mar 11, 2011, 3:07:21 AM3/11/11
to play-framework
I have been looking into various different templating solutions in the
Play world, but none of them really convinced me, so I stayed with the
in my mind very nice Groovy template language (love the syntax, if
only it was faster...).

Can you give a sneak peek of the syntax you are trying to achieve,
before I get my hopes up again? ;)

McKinley1411

unread,
Mar 11, 2011, 3:20:25 AM3/11/11
to play-framework
I'm afraid that if I show you the syntax it will crush your hopes.
However, I find myself most productive with static type checking and
code completion for HTML and Java. If you are like me then I think you
will be happy. However, I must warn you that the syntax is a bad joke,
but hopefully one that will make you smile. That being said, I believe
that in the near future my approach will be the first template system
with IDE support for the big 3 for good syntaxes. That is to say, if
you can live with Java and static templates then my approach will
likely have code and HTML code completion and formatting for Play-like
syntax before the Play templates themselves. Obviously, that will be
with Java and not Groovy and standard Java control structures, but if
you need tokens like #{}, ${}, %{}% I think it will be possible after
a few releases.

Thanks,

McKinley

Arun kumar

unread,
Jul 28, 2013, 10:25:48 AM7/28/13
to play-fr...@googlegroups.com, chri...@jensenbox.com
Guys I found one awesome solution to our formatting issues in eclipse.

You can install aptana plugin for eclipse (http://www.aptana.org/products/studio3/download )

After installing the color palates look similar to sublime text, but you can change them to white background from preference->Aptana Studio -> Themes

This does the formatting of html files just fine.

Thanks
Reply all
Reply to author
Forward
0 new messages