org.eclipse.xtext.ui.editor.templates
Class AbstractTemplateProposalProvider
java.lang.Object
org.eclipse.xtext.ui.editor.templates.AbstractTemplateProposalProvider
- All Implemented Interfaces:
- ITemplateProposalProvider
- Direct Known Subclasses:
- DefaultTemplateProposalProvider
public abstract class AbstractTemplateProposalProvider
- extends java.lang.Object
- implements ITemplateProposalProvider
Provides an abstract implementation of interface ITemplateProposalProvider
.
- Author:
- Michael Clay - Initial contribution and API, Sebastian Zarnekow - Initial contribution and API
Method Summary |
protected org.eclipse.jface.text.templates.TemplateProposal |
createProposal(org.eclipse.jface.text.templates.Template template,
org.eclipse.jface.text.templates.TemplateContext templateContext,
ContentAssistContext context,
org.eclipse.swt.graphics.Image image,
int relevance)
|
protected org.eclipse.jface.text.templates.TemplateContext[] |
createTemplateContexts(ContentAssistContext context)
|
void |
createTemplates(ContentAssistContext context,
ITemplateAcceptor acceptor)
|
protected abstract void |
createTemplates(org.eclipse.jface.text.templates.TemplateContext templateContext,
ContentAssistContext context,
ITemplateAcceptor acceptor)
|
protected org.eclipse.jface.text.templates.TemplateProposal |
doCreateProposal(org.eclipse.jface.text.templates.Template template,
org.eclipse.jface.text.templates.TemplateContext templateContext,
ContentAssistContext context,
org.eclipse.swt.graphics.Image image,
int relevance)
|
protected org.eclipse.jface.text.templates.TemplateContext |
doCreateTemplateContext(org.eclipse.jface.text.templates.TemplateContextType contextType,
ContentAssistContext context)
|
protected abstract org.eclipse.jface.text.templates.TemplateContextType[] |
getContextTypes(ContentAssistContext context)
|
void |
setScopeProvider(IScopeProvider scopeProvider)
|
protected boolean |
validate(org.eclipse.jface.text.templates.Template template,
ContentAssistContext context)
|
protected boolean |
validate(org.eclipse.jface.text.templates.Template template,
org.eclipse.jface.text.templates.TemplateContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTemplateProposalProvider
public AbstractTemplateProposalProvider()
setScopeProvider
@Inject
public void setScopeProvider(IScopeProvider scopeProvider)
createTemplates
public void createTemplates(ContentAssistContext context,
ITemplateAcceptor acceptor)
- Specified by:
createTemplates
in interface ITemplateProposalProvider
createTemplates
protected abstract void createTemplates(org.eclipse.jface.text.templates.TemplateContext templateContext,
ContentAssistContext context,
ITemplateAcceptor acceptor)
createProposal
protected org.eclipse.jface.text.templates.TemplateProposal createProposal(org.eclipse.jface.text.templates.Template template,
org.eclipse.jface.text.templates.TemplateContext templateContext,
ContentAssistContext context,
org.eclipse.swt.graphics.Image image,
int relevance)
doCreateProposal
protected org.eclipse.jface.text.templates.TemplateProposal doCreateProposal(org.eclipse.jface.text.templates.Template template,
org.eclipse.jface.text.templates.TemplateContext templateContext,
ContentAssistContext context,
org.eclipse.swt.graphics.Image image,
int relevance)
validate
protected boolean validate(org.eclipse.jface.text.templates.Template template,
ContentAssistContext context)
validate
protected boolean validate(org.eclipse.jface.text.templates.Template template,
org.eclipse.jface.text.templates.TemplateContext context)
createTemplateContexts
protected org.eclipse.jface.text.templates.TemplateContext[] createTemplateContexts(ContentAssistContext context)
doCreateTemplateContext
protected org.eclipse.jface.text.templates.TemplateContext doCreateTemplateContext(org.eclipse.jface.text.templates.TemplateContextType contextType,
ContentAssistContext context)
getContextTypes
protected abstract org.eclipse.jface.text.templates.TemplateContextType[] getContextTypes(ContentAssistContext context)