title: Eclipse custom text editor update syntax highlighting
body: <p>I am writing an Eclipse plugin (Indigo/Juno) that contains a text editor for a custom text format. I am following the tutorial here: <a href="http://www.realsolve.co.uk/site/tech/jface-text.php" rel="nofollow">http://www.realsolve.co.uk/site/tech/jface-text.php</a></p>
  
  <p>So far I have everything working. Eclipse will use my editor to edit files. I have partitioning, damaging, repairing, syntax highlighting all working.</p>
  
  <p>I added a preferences page with color pickers to control syntax highlighting. It works mostly correct. If I update the colors, the editor uses them the next time I open or reopen a file.</p>
  
  <p>How do I get an editor tab to update itself without opening a new one? The built-in JDT Java editor does this, but so far I have not been able to decipher how (it is a very large and complex editor).</p>
  
  <p>I gather that I need to create a preferences listener (<a href="http://www.vogella.com/articles/EclipsePreferences/article.html" rel="nofollow">http://www.vogella.com/articles/EclipsePreferences/article.html</a>). I have done this and can verify that my listener code is being invoked when I set a breakpoint in it.</p>
  
  <p>The missing piece is the wiring between the listener and reinitializing the editor. I have tried reconstructing the partitioning logic, the color logic, the damager/repairer, etc. but nothing seems to work. It either does nothing I can see or at worst will corrupt the display until I scroll the current text out of view to repaint it... with the old colors.</p>
  
  <p>Any ideas?</p>