views:

1037

answers:

3

In Eclipse 3.4 for Windows, the Source -> Format option for formatting Java code was extended to format HTML code. However, for OS X, this option is disabled. Additionally, there are no formatting options in the Preferences. I've downloaded all the Web Tools for Eclipse and the option is still unavailable.

Which plugin/feature allows for HTML formatting on Eclipse OS X, if there is one? Otherwise, what is a good Web-based alternative?

Thanks, Adam

A: 

I did not see any "Mac OSX-related" formatting improvement in the upcoming Galileo releases (as described in their News And Noteworthy pages)

May be some external plugin like this Flex formatter (also there as a Sourceforge project) would bring as a side effect better HTML formatting ?

(Disclaimer: I have not tested it)

VonC
A: 

For me this works fine in Ganymede on OS X. Two ideas:

  • Maybe your install of the Web Developer Tools (Update Manager -> Ganymede -> Web and Java EE Development -> Web Developer Tools) is incomplete or missing?
  • Could it be that you are not opening the files with the HTML editor (Open With -> HTML Editor)?
Fabian Steeg
A: 

I was unable to solve the problem. So I created a turnaround. I created an external tool configuration for the html Tidy validator:

1) Toolbar > External Tools Configurations 2) Named 'Tidy Format' for example 3) Give the location to tidy (You have to install it of course) 4) Use these arguments: --indent yes -m ${workspace_loc}/${selected_resource_path} 5) In Refresh tab I have: Refresh The Selected Resource 6) Build tab: Nothing 7) Environment tab: Nothing 8) Common tab: Local File, Display External Tools, Allocate Console, Launch in background unchecked

Now the tool is available in the external tool menu for the file you are editing. It works well for me!

Pierre Thibault