org.eclipse.xtext.ui.editor.templates
Class XtextTemplateProposal

java.lang.Object
  extended by org.eclipse.jface.text.templates.TemplateProposal
      extended by org.eclipse.xtext.ui.editor.templates.XtextTemplateProposal
All Implemented Interfaces:
org.eclipse.jface.text.contentassist.ICompletionProposal, org.eclipse.jface.text.contentassist.ICompletionProposalExtension, org.eclipse.jface.text.contentassist.ICompletionProposalExtension2, org.eclipse.jface.text.contentassist.ICompletionProposalExtension3, org.eclipse.jface.text.contentassist.ICompletionProposalExtension4

public class XtextTemplateProposal
extends org.eclipse.jface.text.templates.TemplateProposal
implements org.eclipse.jface.text.contentassist.ICompletionProposalExtension4

Author:
Sebastian Zarnekow - Initial contribution and API

Constructor Summary
XtextTemplateProposal(org.eclipse.jface.text.templates.Template template, org.eclipse.jface.text.templates.TemplateContext context, org.eclipse.jface.text.IRegion region, org.eclipse.swt.graphics.Image image)
           
XtextTemplateProposal(org.eclipse.jface.text.templates.Template template, org.eclipse.jface.text.templates.TemplateContext context, org.eclipse.jface.text.IRegion region, org.eclipse.swt.graphics.Image image, int relevance)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 boolean isAutoInsertable()
          Returns true if the proposal may be automatically inserted, false otherwise.
 
Methods inherited from class org.eclipse.jface.text.templates.TemplateProposal
apply, apply, apply, getAdditionalProposalInfo, getContext, getContextInformation, getContextInformationPosition, getDisplayString, getImage, getInformationControlCreator, getPrefixCompletionStart, getPrefixCompletionText, getRelevance, getReplaceEndOffset, getReplaceOffset, getSelection, getTemplate, getTriggerCharacters, isValidFor, selected, setInformationControlCreator, unselected, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtextTemplateProposal

public XtextTemplateProposal(org.eclipse.jface.text.templates.Template template,
                             org.eclipse.jface.text.templates.TemplateContext context,
                             org.eclipse.jface.text.IRegion region,
                             org.eclipse.swt.graphics.Image image)

XtextTemplateProposal

public XtextTemplateProposal(org.eclipse.jface.text.templates.Template template,
                             org.eclipse.jface.text.templates.TemplateContext context,
                             org.eclipse.jface.text.IRegion region,
                             org.eclipse.swt.graphics.Image image,
                             int relevance)
Method Detail

isAutoInsertable

public boolean isAutoInsertable()
Description copied from interface: org.eclipse.jface.text.contentassist.ICompletionProposalExtension4
Returns true if the proposal may be automatically inserted, false otherwise. Automatic insertion can happen if the proposal is the only one being proposed, in which case the content assistant may decide to not prompt the user with a list of proposals, but simply insert the single proposal. A proposal may veto this behavior by returning false to a call to this method.

Specified by:
isAutoInsertable in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension4
Returns:
true if the proposal may be inserted automatically, false if not

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object