org.eclipse.cdt.internal.corext.template.c
Class CFormatter
java.lang.Object
org.eclipse.cdt.internal.corext.template.c.CFormatter
public class CFormatter
- extends java.lang.Object
A template editor using the C/C++ formatter to format a template buffer.
Constructor Summary |
CFormatter(java.lang.String lineDelimiter,
int initialIndentLevel,
boolean useCodeFormatter,
org.eclipse.cdt.core.model.ICProject project)
Creates a CFormatter with the target line delimiter. |
Method Summary |
void |
format(org.eclipse.jface.text.templates.TemplateBuffer buffer,
org.eclipse.jface.text.templates.TemplateContext context)
Formats the template buffer. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CFormatter
public CFormatter(java.lang.String lineDelimiter,
int initialIndentLevel,
boolean useCodeFormatter,
org.eclipse.cdt.core.model.ICProject project)
- Creates a CFormatter with the target line delimiter.
- Parameters:
lineDelimiter
- the line delimiter to useinitialIndentLevel
- the initial indentation leveluseCodeFormatter
- true
if the core code formatter should be usedproject
- the C/C++ project from which to get the preferences, or null
for workbench settings
format
public void format(org.eclipse.jface.text.templates.TemplateBuffer buffer,
org.eclipse.jface.text.templates.TemplateContext context)
throws org.eclipse.jface.text.BadLocationException
- Formats the template buffer.
- Parameters:
buffer
- context
-
- Throws:
org.eclipse.jface.text.BadLocationException