Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Using special code formatter and 'Indent Line'

Hi Toni,
thanks for the pointers, I guess I'll have to patch the CDT code.
As a matter of fact, we couldn't find a way to configure code style to match our tons of legacy code (which was formatted in Emacs). That was the reason for switching to a new formatter.

Cheers, Achim

Leherbauer, Anton (Toni) wrote on 2010-01-08 11:44:

yes, the indenter engine is separate from the formatter,
but they share the same style settings to accomplish consistency.

There is no extension point to replace the indenter, so I suggest to
configure the code style to match your custom formatter settings as much
as possible.

See IndentAction and CIndenter.


-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx 
[mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Achim Bursian
Sent: Thursday, January 07, 2010 3:44 PM
To: CDT Dev Mailinglist
Subject: [cdt-dev] Using special code formatter and 'Indent Line'

Hi everybody,
I managed to run a special purpose code formatter by using the 
org.eclipse.cdt.core.CodeFormatter extension point. That works fine.

But if the user presses Ctrl-I, another indentation engine is 
used, and 
my formatting gets garbled.
Which code is run when Ctrl-I is pressed? I can't find it.
I'd like to run part of my own formatting code in that case, too, to 
have consistent results with Sh-Ctrl-F and Ctrl-I.

Thanks for help!
cdt-dev mailing list

cdt-dev mailing list


Back to the top