javascripteclipseeclipse-pluginjsdt

How can an Eclipse plugin programmatically change JSDT's default formatter template?


I'm developing a plugin that extends Eclipse JSDT and would like to change the default profile for the JavaScript Formatter (so that my plugin users don't need to do a Preferences->JavaScript->Code Style->Formatter->Import)

I couldn't find any obvious JSDT extension points. Is there any way to do it from my plugin or do I need to do my own rebuild of JSDT?


Solution

  • It seems like there is no way to extend. Anyway, because of this issue and a few other fixes I need that haven't yet made it into JSDT, I decided to include a forked copy of JSDT in my plugin. And the formatting improvement only takes two changed lines: enter image description here