Class TemplateProcessor
- java.lang.Object
-
- com.e1c.g5.v8.dt.lcore.ui.templates.contentassist.TemplateProcessor
-
- All Implemented Interfaces:
ITemplateProcessor
- Direct Known Subclasses:
BslTemplateProcessor
public abstract class TemplateProcessor extends Object implements ITemplateProcessor
Default implementation of ITemplateProcessor
-
-
Constructor Summary
Constructors Constructor Description TemplateProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.jface.text.contentassist.ICompletionProposal
createProposal(List<IVariable> variables, ITemplate template, org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext context)
Creates template proposalprotected IFactoryServiceProvider
getFactoryServiceProvider()
Returns factory to create variablesprotected abstract String
getProgrammingLanguage()
Returns the programming language that this can processprotected VariableFinder
getVariableFinder()
Returns the finder to find variables inside the template stringvoid
process(ITemplate template, org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext context, org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor acceptor)
Processes template by resolving its variables with given context and accepting it with acceptor
-
-
-
Method Detail
-
process
public void process(ITemplate template, org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext context, org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor acceptor)
Description copied from interface:ITemplateProcessor
Processes template by resolving its variables with given context and accepting it with acceptor- Specified by:
process
in interfaceITemplateProcessor
- Parameters:
template
- The template to process, cannot benull
context
- The context where template is going to be applied, cannot benull
acceptor
- The acceptor of resulting proposal, cannot benull
-
createProposal
protected org.eclipse.jface.text.contentassist.ICompletionProposal createProposal(List<IVariable> variables, ITemplate template, org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext context)
Creates template proposal- Parameters:
variables
- The list of the resolved variables, cannot benull
template
- The template that is processed, cannot benull
context
- The context of this template, cannot benull
- Returns:
- The completion proposal, that can apply this template, cannot be
null
-
getFactoryServiceProvider
protected IFactoryServiceProvider getFactoryServiceProvider()
Returns factory to create variables- Returns:
- The variable factory instance to create variables, cannot be
null
-
getVariableFinder
protected VariableFinder getVariableFinder()
Returns the finder to find variables inside the template string- Returns:
- The variable factory instance, cannot be
null
-
getProgrammingLanguage
protected abstract String getProgrammingLanguage()
Returns the programming language that this can process- Returns:
- The programming language this processor can process, cannot be
null
-
-