dolik.rce Messages: 1791 Registered: August 2008 Location: Czech Republic
Ultimate Contributor
rxantos wrote on Thu, 30 May 2013 06:12
Specifically I seek to be able to run astyle on the current viewed source without needing to go to the command line to do it.
Something like:
- Run tool on the code being viewed.
- Automatically reload code if it succeeded.
How do I do this on the IDE?
Hi rxantos,
First of all, astyle is already incorporated in TheIDE via plugin/astyle You can set it up in Setup > Environment > Code Formatting. To apply the rules on currently open file just go to Edit > Advanced > Format code in editor.
If that for some reason isn't good enough, or if you decide to use some other tool later, the simplest way is to write a macro. It could be something as simple as
Just place the code in *.usc file in one of your packages (or into a package of it's own, so you can reuse it in multiple projects). You can find more examples and commented code on macro usage in the reference/Macro package.