Hi,

Code Formatting is an operation that happens at document level more than on
editor, and there isn't enough material to extract and provide some generic
API to do that (it often relies on language specific parsing and so on); so
the Generic Editor doesn't have much support for it. The closest thing is
in Generic Editor are probably the reconcilers and the autoEditStrategies
extension-points that can be used allow to some document edition (eg
formatting) on the fly as user type.
Implementing a specific command to format your language seems to be what's
best at the moment.
You may be interested in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=549348 which suggests
creating 1 common "Format" command with 1 common shortcut so that extenders
could just add handlers for this command instead of redefining the
command+shortcut+handler everytime.

HTH
_______________________________________________
platform-dev mailing list
platform-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev

Reply via email to