RobG 1,892 Posted February 23, 2011 Share Posted February 23, 2011 After spending more and more time with my LaunchPad and CCS, I started to miss one of the features I use daily in my Eclipse, code formatter. CCS does not come with a built-in one, but there are plug-ins available. The one I found is called Astyleand it works pretty well. To install it: Help -> Software Updates -> Find and Install... -> Search for new features... -> New Remote Site Name can be Astyle, URL: http://astyleclipse.sourceforge.net/update Finish, agree, install, restart, etc. After restart: Window -> Preferences... -> C/C++ -> Code Formatter -> Formatters -> Astyle Plugin, Apply and OK. In Preferences -> Astyle, you can choose the actual style, kr in my opinion is the best. To format, Ctrl-Shift-F Enjoy nice code! ( doesn't mean bug free ) bokaltoft, jsolarski, bluehash and 1 other 4 Quote Link to post Share on other sites
bluehash 1,581 Posted February 23, 2011 Share Posted February 23, 2011 Thanks! Nice find. it's ANSI for me. Screenshot. Quote Link to post Share on other sites
RobG 1,892 Posted February 23, 2011 Author Share Posted February 23, 2011 The only thing missing is Save Action which let's you do formatting on save. Quote Link to post Share on other sites
zeke 693 Posted February 23, 2011 Share Posted February 23, 2011 It doesn't seem to work for me. :? Quote Link to post Share on other sites
RobG 1,892 Posted February 23, 2011 Author Share Posted February 23, 2011 It doesn't seem to work for me. :? Why not? Did it install? Quote Link to post Share on other sites
zeke 693 Posted February 23, 2011 Share Posted February 23, 2011 Yup. It installed. Restarted CCS. Opened up my code. Messed with the formatting. Pressed CTRL-SHIFT-F. The screen blinked. Nothing happened with the text. Oh well. Quote Link to post Share on other sites
RobG 1,892 Posted February 23, 2011 Author Share Posted February 23, 2011 Yup. It installed. Restarted CCS. Opened up my code. Messed with the formatting. Pressed CTRL-SHIFT-F. The screen blinked. Nothing happened with the text. Did you set your preferences to use this new formatter? Quote Link to post Share on other sites
zeke 693 Posted February 23, 2011 Share Posted February 23, 2011 That's what I just discovered. I found this nice little howto describing how to configure eclipse to use it. It works great now. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.