Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Code Formatting

> 
> Alex,
> 
> Internally we have developed a plug-in that integrates the freeware ASTYLE
> source code formatter with the standard C/C++ editor from the CDT.  Simply,
> it adds a "Format Source" option to the editor's right-click menu.  When
> clicked, the source is run through ASTYLE.EXE and the output is placed in
> the editor (the editor remains "dirty).  This approach seems to fully
> support local history.
> 
> A project properties page has also been contributed to control ASTYLE
> preferences at the project level.
> 
> For now, we can not share this plug-in with the open source community, but
> will be working that issue.  Hopefully, we can get that done quick so the
> CDT community can evaluate this plug-in.
> 

Then, we do not think that Alex's proposing work will conflict with what you have.
The framework will allow users to choose code formatters, so the ASTYLE.EXE
will be one more contribution available to the users.  The rest will be abstracted
to common code, for example action in the CEditor, the property/preference pages etc ..

Once you are ready to contribute the ASTYLE code it should integrate nicely.
So we could have a:

"AStyle format"
"GNU Indent format"

Alex could expand more, if needs be.
PR is :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=22932




Back to the top