org.eclipse.cdt.internal.ui.text.template
Class TemplateEngine

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.text.template.TemplateEngine

public class TemplateEngine
extends java.lang.Object


Nested Class Summary
 class TemplateEngine.CTemplateProposal
           
 
Constructor Summary
TemplateEngine()
          This is the default constructor used by the new content assist extension point
TemplateEngine(org.eclipse.jface.text.templates.TemplateContextType contextType)
          Creates the template engine for a particular context type.
 
Method Summary
 void complete(org.eclipse.jface.text.ITextViewer viewer, int completionPosition, org.eclipse.cdt.core.model.ITranslationUnit translationUnit)
          Inspects the context of the compilation unit around completionPosition and feeds the collector with proposals.
 java.util.List getResults()
          Returns the array of matching templates.
 void reset()
          Empties the collector.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateEngine

public TemplateEngine(org.eclipse.jface.text.templates.TemplateContextType contextType)
Creates the template engine for a particular context type. See TemplateContext for supported context types.


TemplateEngine

public TemplateEngine()
This is the default constructor used by the new content assist extension point

Method Detail

reset

public void reset()
Empties the collector.


getResults

public java.util.List getResults()
Returns the array of matching templates.


complete

public void complete(org.eclipse.jface.text.ITextViewer viewer,
                     int completionPosition,
                     org.eclipse.cdt.core.model.ITranslationUnit translationUnit)
Inspects the context of the compilation unit around completionPosition and feeds the collector with proposals.

Parameters:
viewer - the text viewer
completionPosition - the context position in the document of the text viewer
translationUnit - the translation unit (may be null)