| Pretty print xml [message #635523] |
Wed, 27 October 2010 04:16  |
Michał Borek Messages: 24 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!
http://www.greenpath.pl
|
|
|
| Re: Pretty print xml [message #636033 is a reply to message #635523] |
Fri, 29 October 2010 02:18  |
Sarika Sinha Messages: 38 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
WTP Programmer
Source Editing
|
|
|
Powered by
FUDForum. Page generated in 0.01862 seconds