title: Trigger Eclipse's code formatter programmatically from a new file wizard
body: <p>I'm writing an Eclipse plugin with a wizard (<code>org.eclipse.jface.wizard.Wizard</code>) which creates a new file with a basic code template. To simplify the "piecing together" of the file contents, I plan to stuff everything into one long string, inject it into the file, and then call my custom Formatter (inherits <code>org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter</code>) to clean up all the indentation and so on.</p>
  
  <p>Question is, how do I go about calling the formatter programmatically?
  In the wizard I call <code>IDE.openEditor()</code> and get back a handle to an <code>IEditorPart</code>. What can I do from here?</p>