org.eclipse.xtext.ui.editor.templates
Class XtextTemplateContext.IndentationAwareTemplateTranslator

java.lang.Object
  extended by org.eclipse.jface.text.templates.TemplateTranslator
      extended by org.eclipse.xtext.ui.editor.templates.XtextTemplateContext.IndentationAwareTemplateTranslator
Enclosing class:
XtextTemplateContext

public static class XtextTemplateContext.IndentationAwareTemplateTranslator
extends org.eclipse.jface.text.templates.TemplateTranslator


Constructor Summary
XtextTemplateContext.IndentationAwareTemplateTranslator(java.lang.String indentation)
           
 
Method Summary
 org.eclipse.jface.text.templates.TemplateBuffer translate(java.lang.String string)
          Translates a template string to TemplateBuffer.
 org.eclipse.jface.text.templates.TemplateBuffer translate(org.eclipse.jface.text.templates.Template template)
          Translates a template to a TemplateBuffer.
 
Methods inherited from class org.eclipse.jface.text.templates.TemplateTranslator
createVariable, createVariable, getErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtextTemplateContext.IndentationAwareTemplateTranslator

public XtextTemplateContext.IndentationAwareTemplateTranslator(java.lang.String indentation)
Method Detail

translate

public org.eclipse.jface.text.templates.TemplateBuffer translate(org.eclipse.jface.text.templates.Template template)
                                                          throws org.eclipse.jface.text.templates.TemplateException
Description copied from class: org.eclipse.jface.text.templates.TemplateTranslator
Translates a template to a TemplateBuffer. null is returned if there was an error. getErrorMessage() retrieves the associated error message.

Overrides:
translate in class org.eclipse.jface.text.templates.TemplateTranslator
Parameters:
template - the template to translate.
Returns:
returns the template buffer corresponding to the string
Throws:
org.eclipse.jface.text.templates.TemplateException - if translation failed
See Also:
TemplateTranslator.getErrorMessage()

translate

public org.eclipse.jface.text.templates.TemplateBuffer translate(java.lang.String string)
                                                          throws org.eclipse.jface.text.templates.TemplateException
Description copied from class: org.eclipse.jface.text.templates.TemplateTranslator
Translates a template string to TemplateBuffer. null is returned if there was an error. getErrorMessage() retrieves the associated error message.

Overrides:
translate in class org.eclipse.jface.text.templates.TemplateTranslator
Parameters:
string - the string to translate.
Returns:
returns the template buffer corresponding to the string
Throws:
org.eclipse.jface.text.templates.TemplateException - if translation failed
See Also:
TemplateTranslator.getErrorMessage()