org.eclipse.xtext.ui.editor.contentassist
Class RepeatedContentAssistProcessor
java.lang.Object
org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor
org.eclipse.xtext.ui.editor.contentassist.RepeatedContentAssistProcessor
- All Implemented Interfaces:
- org.eclipse.jface.text.contentassist.ICompletionListener, org.eclipse.jface.text.contentassist.ICompletionListenerExtension, org.eclipse.jface.text.contentassist.IContentAssistProcessor, CompletionProposalComputer.State, ContextInformationComputer.State
public class RepeatedContentAssistProcessor
- extends XtextContentAssistProcessor
- implements org.eclipse.jface.text.contentassist.ICompletionListener, org.eclipse.jface.text.contentassist.ICompletionListenerExtension
- Author:
- Sebastian Zarnekow - Initial contribution and API
Method Summary |
void |
assistSessionEnded(org.eclipse.jface.text.contentassist.ContentAssistEvent event)
Called when a code assist session ends (for example, the proposal popup is closed). |
void |
assistSessionRestarted(org.eclipse.jface.text.contentassist.ContentAssistEvent event)
Called when code assist is invoked when there is already a current code assist session. |
void |
assistSessionStarted(org.eclipse.jface.text.contentassist.ContentAssistEvent event)
Called when code assist is invoked when there is no current code assist session. |
org.eclipse.jface.text.contentassist.ICompletionProposal[] |
computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer,
int offset)
Returns a list of completion proposals based on the
specified location within the document that corresponds
to the current cursor position within the text viewer. |
RepeatedContentAssistProcessor.ModeAware |
getModeAwareProposalProvider()
|
protected java.lang.String |
getStatusMessage()
|
void |
selectionChanged(org.eclipse.jface.text.contentassist.ICompletionProposal proposal,
boolean smartToggle)
Called when the selection in the proposal popup is changed or if the insert-mode changed. |
Methods inherited from class org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor |
computeContextInformation, createCompletionProposalComputer, createContextInformationComputer, decorateAcceptor, decorateAcceptor, decorateAcceptor, getCompletionProposalAutoActivationCharacters, getCompletionProposalPostProcessor, getContentProposalProvider, getContextFactory, getContextInformationAutoActivationCharacters, getContextInformationProvider, getContextInformationValidator, getErrorMessage, getTemplateProposalProvider, setCompletionProposalAutoActivationCharacters, setCompletionProposalPostProcessor, setContentProposalProvider, setContextFactory, setContextInformationAutoActivationCharacters, setErrorMessage, setTemplateProposalProvider |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RepeatedContentAssistProcessor
public RepeatedContentAssistProcessor()
getModeAwareProposalProvider
public RepeatedContentAssistProcessor.ModeAware getModeAwareProposalProvider()
computeCompletionProposals
public org.eclipse.jface.text.contentassist.ICompletionProposal[] computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer,
int offset)
- Description copied from interface:
org.eclipse.jface.text.contentassist.IContentAssistProcessor
- Returns a list of completion proposals based on the
specified location within the document that corresponds
to the current cursor position within the text viewer.
- Specified by:
computeCompletionProposals
in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor
- Overrides:
computeCompletionProposals
in class XtextContentAssistProcessor
- Parameters:
viewer
- the viewer whose document is used to compute the proposalsoffset
- an offset within the document for which completions should be computed
- Returns:
- an array of completion proposals or
null
if no proposals are possible
getStatusMessage
protected java.lang.String getStatusMessage()
assistSessionStarted
public void assistSessionStarted(org.eclipse.jface.text.contentassist.ContentAssistEvent event)
- Description copied from interface:
org.eclipse.jface.text.contentassist.ICompletionListener
- Called when code assist is invoked when there is no current code assist session.
- Specified by:
assistSessionStarted
in interface org.eclipse.jface.text.contentassist.ICompletionListener
- Parameters:
event
- the content assist event
assistSessionEnded
public void assistSessionEnded(org.eclipse.jface.text.contentassist.ContentAssistEvent event)
- Description copied from interface:
org.eclipse.jface.text.contentassist.ICompletionListener
- Called when a code assist session ends (for example, the proposal popup is closed).
- Specified by:
assistSessionEnded
in interface org.eclipse.jface.text.contentassist.ICompletionListener
- Parameters:
event
- the content assist event
assistSessionRestarted
public void assistSessionRestarted(org.eclipse.jface.text.contentassist.ContentAssistEvent event)
- Description copied from interface:
org.eclipse.jface.text.contentassist.ICompletionListenerExtension
- Called when code assist is invoked when there is already a current code assist session.
- Specified by:
assistSessionRestarted
in interface org.eclipse.jface.text.contentassist.ICompletionListenerExtension
- Parameters:
event
- the content assist event
selectionChanged
public void selectionChanged(org.eclipse.jface.text.contentassist.ICompletionProposal proposal,
boolean smartToggle)
- Description copied from interface:
org.eclipse.jface.text.contentassist.ICompletionListener
- Called when the selection in the proposal popup is changed or if the insert-mode changed.
- Specified by:
selectionChanged
in interface org.eclipse.jface.text.contentassist.ICompletionListener
- Parameters:
proposal
- the newly selected proposal, possibly null
smartToggle
- true
if the insert-mode toggle is being pressed,
false
otherwise