org.eclipse.xtext.ui.editor.quickfix
Class XtextQuickAssistAssistant

java.lang.Object
  extended by org.eclipse.jface.text.quickassist.QuickAssistAssistant
      extended by org.eclipse.xtext.ui.editor.quickfix.XtextQuickAssistAssistant
All Implemented Interfaces:
org.eclipse.jface.text.quickassist.IQuickAssistAssistant, org.eclipse.jface.text.quickassist.IQuickAssistAssistantExtension

public class XtextQuickAssistAssistant
extends org.eclipse.jface.text.quickassist.QuickAssistAssistant

Author:
Knut Wannheden - Initial contribution and API, Heiko Behrens, Jan Koehnlein

Field Summary
protected  org.eclipse.jface.text.Position storedPosition
           
protected  org.eclipse.jface.text.source.ISourceViewer viewer
           
 
Constructor Summary
XtextQuickAssistAssistant(XtextQuickAssistProcessor processor)
           
 
Method Summary
protected  org.eclipse.jface.text.AbstractReusableInformationControlCreator createInformationControlCreator()
           
 void install(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
          Installs quick assist support on the given source viewer.
protected  void setRestoreSelection()
           
 void uninstall()
          Uninstalls quick assist support from the source viewer it has previously be installed on.
 
Methods inherited from class org.eclipse.jface.text.quickassist.QuickAssistAssistant
addCompletionListener, canAssist, canFix, enableColoredLabels, getHandler, getQuickAssistProcessor, hide, possibleCompletionsClosed, removeCompletionListener, setInformationControlCreator, setProposalSelectorBackground, setProposalSelectorForeground, setQuickAssistProcessor, setRestoreCompletionProposalSize, setStatusLineVisible, setStatusMessage, showPossibleQuickAssists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewer

protected org.eclipse.jface.text.source.ISourceViewer viewer

storedPosition

protected org.eclipse.jface.text.Position storedPosition
Constructor Detail

XtextQuickAssistAssistant

@Inject
public XtextQuickAssistAssistant(XtextQuickAssistProcessor processor)
Method Detail

setRestoreSelection

protected void setRestoreSelection()

createInformationControlCreator

protected org.eclipse.jface.text.AbstractReusableInformationControlCreator createInformationControlCreator()

install

public void install(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Description copied from interface: org.eclipse.jface.text.quickassist.IQuickAssistAssistant
Installs quick assist support on the given source viewer.

Note: This quick assist assistant will only be able to query the invocation context if sourceViewer also implements ISourceViewerExtension3.

Specified by:
install in interface org.eclipse.jface.text.quickassist.IQuickAssistAssistant
Overrides:
install in class org.eclipse.jface.text.quickassist.QuickAssistAssistant
Parameters:
sourceViewer - the source viewer on which quick assist will work

uninstall

public void uninstall()
Description copied from interface: org.eclipse.jface.text.quickassist.IQuickAssistAssistant
Uninstalls quick assist support from the source viewer it has previously be installed on.

Specified by:
uninstall in interface org.eclipse.jface.text.quickassist.IQuickAssistAssistant
Overrides:
uninstall in class org.eclipse.jface.text.quickassist.QuickAssistAssistant