|
|
|
|
|
|
|
|
|
|
Re: How can I setup code formatter in eclipse cdt? [message #164704 is a reply to message #164680] |
Sun, 26 February 2006 03:33   |
Eclipse User |
|
|
|
Originally posted by: berend.chalmers.se
Hi,
Yes I am sorry - I meant to say GNU indent does not work for C++. Try
astyle instead then.
But even so, I cannot see why indent generates extra code. Maybe
something strange in an .ident.prr file? My .indent.pro file contains:
-i4 -npsl -di0 -bl -d0 -cli0 -npcs -nprs -nut -sai -saf -nfca -bli0 -ci4
-l140
Berend.
> On Sat, 2006-02-25 at 22:54 +0100, Berend van Wachem wrote:
>
>>Hi,
>>
>>I just tried your code and it works fine here. I cannot see why the
>>indent should create the extra "const".
>
>
> I've seen indent do weird things from time to time...
>
>
>>The GNU indent does not work for C. But again, I don't see wy it should
>>generate extra text.
>
>
> Eh? GNU indent was made for C, was it not? The info page for GNU indent
> tells me that it is made explicitly for indenting and formatting C
> program source.
>
>
>>Berend.
>>
>>
>>
>>
>>
>>>I tried that plugins that you suggest. But after I format the code, it
>>>results in code which can't compile.
>>>
>>>i have a funcion like this:
>>>
>>>void aFunct const {
>>>// my implmentation.
>>>}
>>>
>>>but after I format it, it becomes
>>>void aFunct const const {
>>>// my implmentation.
>>>}
>>>
>
>
--
/\-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-=-\
L_@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@
| Berend van Wachem |
| Multiphase Flow Group |
| Chalmers University of Technology |
| |
| Please note that my email address has changed to: |
| Berend@chalmers.se |
| |
| Please make the appropriate changes in your address |
| list. |
| |
__@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@
\/______________________________________________________/
|
|
|
|
Re: How can I setup code formatter in eclipse cdt? [message #168539 is a reply to message #168025] |
Thu, 20 April 2006 07:36  |
Eclipse User |
|
|
|
Originally posted by: arne.anka.ginguppin.de
> The referenced plugin is for indent. Is there a plugin available to use
> astyle?
no. you have to wrap astyle in a script to convert the parameters, set the
radiobutton to "custom" and add the astyle parameters by hand:
#!/bin/sh
unset arglist
while [ $# -gt 3 ]; do
arglist="$arglist $1"
shift
done
/usr/bin/astyle $arglist < "$1" > "$3"
|
|
|
Powered by
FUDForum. Page generated in 0.04697 seconds