Class QuickAssistAssistant
- All Implemented Interfaces:
- IQuickAssistAssistant,- IQuickAssistAssistantExtension
IQuickAssistAssistant.- Since:
- 3.2
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCompletionListener(ICompletionListener listener) Adds a completion listener that will be informed before proposals are computed.booleancanAssist(IQuickAssistInvocationContext invocationContext) Tells whether this assistant has assists for the given invocation context.booleancanFix(Annotation annotation) Tells whether this assistant has a fix for the given annotation.voidenableColoredLabels(boolean isEnabled) Enables the support for colored labels in the proposal popup.final IHandlergetHandler(String commandId) Returns the handler for the given command identifier.Returns the quick assist processor to be used for the given content type.protected voidhide()Hides any open pop-ups.voidinstall(ISourceViewer sourceViewer) Installs quick assist support on the given source viewer.protected voidCallback to signal this quick assist assistant that the presentation of the possible completions has been stopped.voidremoveCompletionListener(ICompletionListener listener) Removes a completion listener.voidSets the information control creator for the additional information control.voidsetProposalSelectorBackground(Color background) Sets the proposal selector's background color.voidsetProposalSelectorForeground(Color foreground) Sets the proposal's foreground color.voidsetQuickAssistProcessor(IQuickAssistProcessor processor) Registers a given quick assist processor for a particular content type.voidsetRestoreCompletionProposalSize(IDialogSettings dialogSettings) Tells this assistant to open the proposal popup with the size contained in the given dialog settings and to store the control's last valid size in the given dialog settings.voidsetStatusLineVisible(boolean show) Enables displaying a status line below the proposal popup.voidsetStatusMessage(String message) Sets the caption message displayed at the bottom of the completion proposal popup.Shows all possible quick fixes and quick assists at the viewer's cursor position.voidUninstalls quick assist support from the source viewer it has previously be installed on.
- 
Constructor Details- 
QuickAssistAssistantpublic QuickAssistAssistant()
 
- 
- 
Method Details- 
showPossibleQuickAssistsDescription copied from interface:IQuickAssistAssistantShows all possible quick fixes and quick assists at the viewer's cursor position.- Specified by:
- showPossibleQuickAssistsin interface- IQuickAssistAssistant
- Returns:
- an optional error message if no proposals can be computed
 
- 
getQuickAssistProcessorDescription copied from interface:IQuickAssistAssistantReturns the quick assist processor to be used for the given content type.- Specified by:
- getQuickAssistProcessorin interface- IQuickAssistAssistant
- Returns:
- the quick assist processor or nullif none exists
 
- 
setQuickAssistProcessorDescription copied from interface:IQuickAssistAssistantRegisters a given quick assist processor for a particular content type. If there is already a processor registered, the new processor is registered instead of the old one.- Specified by:
- setQuickAssistProcessorin interface- IQuickAssistAssistant
- Parameters:
- processor- the quick assist processor to register, or- nullto remove an existing one
 
- 
canFixDescription copied from interface:IQuickAssistAssistantTells whether this assistant has a fix for the given annotation.Note: This test must be fast and optimistic i.e. it is OK to return trueeven though there might be no quick fix.- Specified by:
- canFixin interface- IQuickAssistAssistant
- Parameters:
- annotation- the annotation
- Returns:
- trueif the assistant has a fix for the given annotation
 
- 
canAssistDescription copied from interface:IQuickAssistAssistantTells whether this assistant has assists for the given invocation context.- Specified by:
- canAssistin interface- IQuickAssistAssistant
- Parameters:
- invocationContext- the invocation context
- Returns:
- trueif the assistant has a fix for the given annotation
 
- 
installDescription copied from interface:IQuickAssistAssistantInstalls quick assist support on the given source viewer.Note: This quick assist assistant will only be able to query the invocation context if sourceVieweralso implementsISourceViewerExtension3.- Specified by:
- installin interface- IQuickAssistAssistant
- Parameters:
- sourceViewer- the source viewer on which quick assist will work
 
- 
setInformationControlCreatorDescription copied from interface:IQuickAssistAssistantSets the information control creator for the additional information control.- Specified by:
- setInformationControlCreatorin interface- IQuickAssistAssistant
- Parameters:
- creator- the information control creator for the additional information control
 
- 
uninstallpublic void uninstall()Description copied from interface:IQuickAssistAssistantUninstalls quick assist support from the source viewer it has previously be installed on.- Specified by:
- uninstallin interface- IQuickAssistAssistant
 
- 
setProposalSelectorBackgroundDescription copied from interface:IQuickAssistAssistantSets the proposal selector's background color.Note: As of 3.4, you should only call this method if you want to override the JFacePreferences.CONTENT_ASSIST_BACKGROUND_COLOR.- Specified by:
- setProposalSelectorBackgroundin interface- IQuickAssistAssistant
- Parameters:
- background- the background color
 
- 
setProposalSelectorForegroundDescription copied from interface:IQuickAssistAssistantSets the proposal's foreground color.Note: As of 3.4, you should only call this method if you want to override the JFacePreferences.CONTENT_ASSIST_FOREGROUND_COLOR.- Specified by:
- setProposalSelectorForegroundin interface- IQuickAssistAssistant
- Parameters:
- foreground- the foreground color
 
- 
setRestoreCompletionProposalSizeTells this assistant to open the proposal popup with the size contained in the given dialog settings and to store the control's last valid size in the given dialog settings.Note: This API is only valid if the information control implements IInformationControlExtension3. Not following this restriction will later result in anUnsupportedOperationException.The constants used to store the values are: - Parameters:
- dialogSettings- the dialog settings
- Since:
- 3.7
 
- 
possibleCompletionsClosedprotected void possibleCompletionsClosed()Callback to signal this quick assist assistant that the presentation of the possible completions has been stopped.
- 
addCompletionListenerDescription copied from interface:IQuickAssistAssistantAdds a completion listener that will be informed before proposals are computed.- Specified by:
- addCompletionListenerin interface- IQuickAssistAssistant
- Parameters:
- listener- the listener
 
- 
removeCompletionListenerDescription copied from interface:IQuickAssistAssistantRemoves a completion listener.- Specified by:
- removeCompletionListenerin interface- IQuickAssistAssistant
- Parameters:
- listener- the listener to remove
 
- 
setStatusLineVisiblepublic void setStatusLineVisible(boolean show) Description copied from interface:IQuickAssistAssistantEnables displaying a status line below the proposal popup. The default is not to show the status line. The contents of the status line may be set viaIQuickAssistAssistant.setStatusMessage(String).- Specified by:
- setStatusLineVisiblein interface- IQuickAssistAssistant
- Parameters:
- show-- trueto show a message line,- falseto not show one.
 
- 
setStatusMessageDescription copied from interface:IQuickAssistAssistantSets the caption message displayed at the bottom of the completion proposal popup.- Specified by:
- setStatusMessagein interface- IQuickAssistAssistant
- Parameters:
- message- the message
 
- 
getHandlerReturns the handler for the given command identifier.The same handler instance will be returned when called a more than once with the same command identifier. - Specified by:
- getHandlerin interface- IQuickAssistAssistantExtension
- Parameters:
- commandId- the command identifier
- Returns:
- the handler for the given command identifier
- Since:
- 3.4
 
- 
hideprotected void hide()Hides any open pop-ups.- Since:
- 3.4
 
- 
enableColoredLabelspublic void enableColoredLabels(boolean isEnabled) Enables the support for colored labels in the proposal popup.Completion proposals can implement ICompletionProposalExtension6to provide colored proposal labels.- Specified by:
- enableColoredLabelsin interface- IQuickAssistAssistantExtension
- Parameters:
- isEnabled- if- truethe support for colored labels is enabled in the proposal popup
- Since:
- 3.4
 
 
-