Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Code Formatter (contrib ?)

Bonjour,
  in the head(for 2.1), the initial framework was committed for the CEditor
to retrieve different code formatters(an extension point).

Only the core framework is in the head meaning
there is no UI to customize the formatters(maybe for cdt-3.0 ?)


Attached is a plugin illustrating the extension point and the interface usage.

org.eclipse.cdt.indent:

 - use "GNU Indent" as the formatter.
   The command is hardcoded, assuming you have "indent" in your path
 - for more info on the options, see indent(3), you can set the options
   in a file call .indent.pro (see the man page for more detail).
 - After restarting CDT select the "GNU Indent" plugin in the prefernce page(C/C++ Code Formatter)
 - use the CEditor context menu "Format" or Ctl+Shift+F to reindent a selection or the entire buffer.


Hope it will be of help until we get a complete solution for the CDT.

Attachment: indent.zip
Description: zip archive file - version [3 4]


Back to the top