org.eclipse.xpand.support.cdt
Class CppBeautifier
java.lang.Object
org.eclipse.xpand.support.cdt.CppBeautifier
- All Implemented Interfaces:
- PostProcessor
public class CppBeautifier
- extends java.lang.Object
- implements PostProcessor
An Xpand post processor for C/C++ code formatting based on cdt's code
formatter.
It uses some internal CDT classes to do its job, but this was the only way to
get this to work outside an Eclipse runtime. Use it like this (from an MWE
workflow):
<postprocessor class="org.eclipse.xpand.support.cdt.CppBeautifier" configFile="myCFormatterOptions.xml"/>
In order to create a configuration file, use CDT's preferences to set
formatter options and then export that configuration to a file.
- Author:
- DaWeber@harmanbecker.com, Karsten Thoms karsten.thoms@itemis.de
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CppBeautifier
public CppBeautifier()
afterClose
public void afterClose(FileHandle impl)
- Description copied from interface:
PostProcessor
- Called after the file has been written.
- Specified by:
afterClose
in interface PostProcessor
- Parameters:
impl
- A handle to the file that has been written
beforeWriteAndClose
public void beforeWriteAndClose(FileHandle fileHandle)
- Description copied from interface:
PostProcessor
- Called before the file will be written.
- Specified by:
beforeWriteAndClose
in interface PostProcessor
- Parameters:
fileHandle
- A handle to the file that will be written
getConfigFile
public java.lang.String getConfigFile()
- Returns:
- the configuration file for the formatter
setConfigFile
public void setConfigFile(java.lang.String configFile)
- Parameters:
configFile
- configuration file for the formatter