de.cau.cs.kieler.s.sc.beautifier
Class Beautifier
java.lang.Object
de.cau.cs.kieler.s.sc.beautifier.Beautifier
- All Implemented Interfaces:
- org.eclipse.xpand2.output.PostProcessor
public class Beautifier
- extends Object
- implements org.eclipse.xpand2.output.PostProcessor
Formats generated Java code using the Eclipse code formatter.
- Since:
- 4.0
- Rating

Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Beautifier
public Beautifier()
beforeWriteAndClose
public void beforeWriteAndClose(org.eclipse.xpand2.output.FileHandle info)
- Formats the file using Eclipse code formatter. The file must have the
extension '.c'.
- Specified by:
beforeWriteAndClose
in interface org.eclipse.xpand2.output.PostProcessor
openStream
protected InputStream openStream(String filename)
throws IOException
- Searches for the given filename as a resource and returns a stream on it. Throws an IOException, if the file
cannot be found.
- Parameters:
filename
- The name of the file to be searched in the resources.
- Returns:
- InputStream for subsequent reading
- Throws:
IOException
getConfigFile
public String getConfigFile()
- Returns:
- the configuration file for the formatter
setConfigFile
public void setConfigFile(String configFile)
- Parameters:
configFile
- configuration file for the formatter
afterClose
public void afterClose(org.eclipse.xpand2.output.FileHandle impl)
-
- Specified by:
afterClose
in interface org.eclipse.xpand2.output.PostProcessor