Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Pretty print xml
Pretty print xml [message #635523] Wed, 27 October 2010 08:16 Go to next message
Michal Borek is currently offline Michal BorekFriend
Messages: 25
Registered: August 2010
Junior Member
I'm building Eclipse plugin that uses StructuredTextEditor
In Structured Text Editor there is Formatting functionality. Could you tell me how to invoke it from code?

I'm adding elements to xml document via DocumentBuilder and it's not formatted in source editor then. I don't want to format it manually because there is such functionality in WTP.

Thank you for your help!
Re: Pretty print xml [message #636033 is a reply to message #635523] Fri, 29 October 2010 06:18 Go to previous message
Sarika Sinha is currently offline Sarika SinhaFriend
Messages: 114
Registered: February 2010
Location: Bangalore, India
Senior Member
You can try using org.eclipse.wst.xml.core.internal.provisional.format.FormatP rocessorXML and format the model .This will format based on the preferences. You can also override the preference before formatting.

Sarika Sinha
JDT Programmer
Previous Topic:Why my Helios is so slow
Next Topic:tomcat 5.5 is not listed in the new server wizard.
Goto Forum:

Current Time: Mon Oct 26 14:52:56 GMT 2020

Powered by FUDForum. Page generated in 0.01556 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top