views:

304

answers:

1

Is there a function for GWT (Google Web Toolkit) to pretty-print the html output of widgets? (apologies if the question is badly phrased - I'm not a GWT dev, but our developers are claiming that there's no way to do this)

Currently all output is a huge single-line block, making debugging of CSS issues etc. a considerable task.

HTML Tidy / Pretty Print, at least during testing, would be a great help.

+4  A: 

If you use Firebug, it's all nicely formatted (the HTML, that is). If you want the compiled JavaScript code to make more sense, you can use the -style PRETTY switch.

Igor Klimer
For help with CSS, CSSEdit on the Mac (sure there is similar for Windows) also useful.
AlexJReid
Thanks guys, but I'm looking for something that would have the server outputting nice code, vs. me taking the "messy" code and formatting it by hand.(I'm surprised that there's nothing already built-in that would do that)
ilia
I'm not sure I understand you - what do you mean by having the server output nice code? The compiled GWT is obfuscated and minimized to make the code as small as possible. It shouldn't matter because if you're debugging, you should be debugging the Java code and if you are debugging the CSS code, a tool like Firebug is an obvious choice. There's no need to format any output by hand.
Igor Klimer
"There's no need to format any output by hand."Well that's the thing, I would've like to have a way to in fact handle the code manually, as it were. Firebug is great but sometimes I just want to dig into the code myself with nothing but Notepad++ between me and the code :)Anyway, thanks for the replies.
ilia