Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (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 Borek
Messages: 25
Registered: August 2010
Junior Member
Hello,
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 Sinha
Messages: 45
Registered: February 2010
Location: Bangalore, India
Member
Hi,
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: Fri Sep 19 00:03:53 GMT 2014

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

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