org.eclipse.xtext.ui.editor.contentassist
Class XtextContentAssistProcessor

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor
All Implemented Interfaces:
org.eclipse.jface.text.contentassist.IContentAssistProcessor, CompletionProposalComputer.State, ContextInformationComputer.State
Direct Known Subclasses:
RepeatedContentAssistProcessor

public class XtextContentAssistProcessor
extends java.lang.Object
implements org.eclipse.jface.text.contentassist.IContentAssistProcessor, CompletionProposalComputer.State, ContextInformationComputer.State

Author:
Sebastian Zarnekow - Initial contribution and API

Field Summary
static java.lang.String COMPLETION_AUTO_ACTIVATION_CHARS
           
static java.lang.String CONTEXT_INFO_AUTO_ACTIVATION_CHARS
           
static java.lang.String ERROR_MESSAGE
           
 
Constructor Summary
XtextContentAssistProcessor()
           
 
Method Summary
 org.eclipse.jface.text.contentassist.ICompletionProposal[] computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer, int offset)
           
 org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.ITextViewer viewer, int offset)
           
protected  CompletionProposalComputer createCompletionProposalComputer(org.eclipse.jface.text.ITextViewer viewer, int offset)
           
protected  ContextInformationComputer createContextInformationComputer(org.eclipse.jface.text.ITextViewer viewer, int offset)
           
 ICompletionProposalAcceptor decorateAcceptor(ICompletionProposalAcceptor acceptor)
           
 IContextInformationAcceptor decorateAcceptor(IContextInformationAcceptor acceptor)
           
 ITemplateAcceptor decorateAcceptor(ITemplateAcceptor acceptor)
           
 char[] getCompletionProposalAutoActivationCharacters()
           
 ICompletionProposalPostProcessor getCompletionProposalPostProcessor()
           
 IContentProposalProvider getContentProposalProvider()
           
 ContentAssistContext.Factory getContextFactory()
           
 char[] getContextInformationAutoActivationCharacters()
           
 IContextInformationProvider getContextInformationProvider()
           
 org.eclipse.jface.text.contentassist.IContextInformationValidator getContextInformationValidator()
           
 java.lang.String getErrorMessage()
           
 ITemplateProposalProvider getTemplateProposalProvider()
           
 void setCompletionProposalAutoActivationCharacters(java.lang.String completionProposalAutoActivationCharacters)
           
 void setCompletionProposalPostProcessor(ICompletionProposalPostProcessor completionProposalPostProcessor)
           
 void setContentProposalProvider(IContentProposalProvider contentProposalProvider)
           
 void setContextFactory(ContentAssistContext.Factory contextFactory)
           
 void setContextInformationAutoActivationCharacters(java.lang.String contextInformationAutoActivationCharacters)
           
 void setErrorMessage(java.lang.String errorMessage)
           
 void setTemplateProposalProvider(ITemplateProposalProvider templateProposalProvider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPLETION_AUTO_ACTIVATION_CHARS

public static final java.lang.String COMPLETION_AUTO_ACTIVATION_CHARS
See Also:
Constant Field Values

CONTEXT_INFO_AUTO_ACTIVATION_CHARS

public static final java.lang.String CONTEXT_INFO_AUTO_ACTIVATION_CHARS
See Also:
Constant Field Values

ERROR_MESSAGE

public static final java.lang.String ERROR_MESSAGE
See Also:
Constant Field Values
Constructor Detail

XtextContentAssistProcessor

public XtextContentAssistProcessor()
Method Detail

computeCompletionProposals

public org.eclipse.jface.text.contentassist.ICompletionProposal[] computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer,
                                                                                             int offset)
Specified by:
computeCompletionProposals in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

createCompletionProposalComputer

protected CompletionProposalComputer createCompletionProposalComputer(org.eclipse.jface.text.ITextViewer viewer,
                                                                      int offset)

computeContextInformation

public org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.ITextViewer viewer,
                                                                                            int offset)
Specified by:
computeContextInformation in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

createContextInformationComputer

protected ContextInformationComputer createContextInformationComputer(org.eclipse.jface.text.ITextViewer viewer,
                                                                      int offset)

getCompletionProposalAutoActivationCharacters

public char[] getCompletionProposalAutoActivationCharacters()
Specified by:
getCompletionProposalAutoActivationCharacters in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

getContextInformationAutoActivationCharacters

public char[] getContextInformationAutoActivationCharacters()
Specified by:
getContextInformationAutoActivationCharacters in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

getContextInformationValidator

public org.eclipse.jface.text.contentassist.IContextInformationValidator getContextInformationValidator()
Specified by:
getContextInformationValidator in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

getErrorMessage

public java.lang.String getErrorMessage()
Specified by:
getErrorMessage in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

setCompletionProposalAutoActivationCharacters

public void setCompletionProposalAutoActivationCharacters(java.lang.String completionProposalAutoActivationCharacters)

setContextFactory

public void setContextFactory(ContentAssistContext.Factory contextFactory)

getContextFactory

public ContentAssistContext.Factory getContextFactory()
Specified by:
getContextFactory in interface CompletionProposalComputer.State
Specified by:
getContextFactory in interface ContextInformationComputer.State

setErrorMessage

public void setErrorMessage(java.lang.String errorMessage)

setContextInformationAutoActivationCharacters

public void setContextInformationAutoActivationCharacters(java.lang.String contextInformationAutoActivationCharacters)

setContentProposalProvider

public void setContentProposalProvider(IContentProposalProvider contentProposalProvider)

getContentProposalProvider

public IContentProposalProvider getContentProposalProvider()
Specified by:
getContentProposalProvider in interface CompletionProposalComputer.State

setTemplateProposalProvider

public void setTemplateProposalProvider(ITemplateProposalProvider templateProposalProvider)

getTemplateProposalProvider

public ITemplateProposalProvider getTemplateProposalProvider()
Specified by:
getTemplateProposalProvider in interface CompletionProposalComputer.State

getContextInformationProvider

public IContextInformationProvider getContextInformationProvider()
Specified by:
getContextInformationProvider in interface ContextInformationComputer.State

decorateAcceptor

public ICompletionProposalAcceptor decorateAcceptor(ICompletionProposalAcceptor acceptor)
Specified by:
decorateAcceptor in interface CompletionProposalComputer.State

decorateAcceptor

public ITemplateAcceptor decorateAcceptor(ITemplateAcceptor acceptor)
Specified by:
decorateAcceptor in interface CompletionProposalComputer.State

decorateAcceptor

public IContextInformationAcceptor decorateAcceptor(IContextInformationAcceptor acceptor)
Specified by:
decorateAcceptor in interface ContextInformationComputer.State

setCompletionProposalPostProcessor

public void setCompletionProposalPostProcessor(ICompletionProposalPostProcessor completionProposalPostProcessor)

getCompletionProposalPostProcessor

public ICompletionProposalPostProcessor getCompletionProposalPostProcessor()