|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.quickassist.QuickAssistAssistant
public class QuickAssistAssistant
Default implementation of IQuickAssistAssistant.
| Constructor Summary | |
|---|---|
QuickAssistAssistant()
|
|
| Method Summary | |
|---|---|
void |
addCompletionListener(ICompletionListener listener)
Adds a completion listener that will be informed before proposals are computed. |
boolean |
canAssist(IQuickAssistInvocationContext invocationContext)
Tells whether this assistant has assists for the given invocation context. |
boolean |
canFix(Annotation annotation)
Tells whether this assistant has a fix for the given annotation. |
void |
enableColoredLabels(boolean isEnabled)
Enables the support for colored labels in the proposal popup. |
IHandler |
getHandler(String commandId)
Returns the handler for the given command identifier. |
IQuickAssistProcessor |
getQuickAssistProcessor()
Returns the quick assist processor to be used for the given content type. |
protected void |
hide()
Hides any open pop-ups. |
void |
install(ISourceViewer sourceViewer)
Installs quick assist support on the given source viewer. |
protected void |
possibleCompletionsClosed()
Callback to signal this quick assist assistant that the presentation of the possible completions has been stopped. |
void |
removeCompletionListener(ICompletionListener listener)
Removes a completion listener. |
void |
setInformationControlCreator(IInformationControlCreator creator)
Sets the information control creator for the additional information control. |
void |
setProposalSelectorBackground(Color background)
Sets the proposal selector's background color. |
void |
setProposalSelectorForeground(Color foreground)
Sets the proposal's foreground color. |
void |
setQuickAssistProcessor(IQuickAssistProcessor processor)
Registers a given quick assist processor for a particular content type. |
void |
setRestoreCompletionProposalSize(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. |
void |
setStatusLineVisible(boolean show)
Enables displaying a status line below the proposal popup. |
void |
setStatusMessage(String message)
Sets the caption message displayed at the bottom of the completion proposal popup. |
String |
showPossibleQuickAssists()
Shows all possible quick fixes and quick assists at the viewer's cursor position. |
void |
uninstall()
Uninstalls quick assist support from the source viewer it has previously be installed on. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QuickAssistAssistant()
| Method Detail |
|---|
public String showPossibleQuickAssists()
IQuickAssistAssistant
showPossibleQuickAssists in interface IQuickAssistAssistantpublic IQuickAssistProcessor getQuickAssistProcessor()
IQuickAssistAssistant
getQuickAssistProcessor in interface IQuickAssistAssistantnull if none existspublic void setQuickAssistProcessor(IQuickAssistProcessor processor)
IQuickAssistAssistant
setQuickAssistProcessor in interface IQuickAssistAssistantprocessor - the quick assist processor to register, or null to remove
an existing onepublic boolean canFix(Annotation annotation)
IQuickAssistAssistant
Note: This test must be fast and optimistic i.e. it is OK to return
true even though there might be no quick fix.
canFix in interface IQuickAssistAssistantannotation - the annotation
true if the assistant has a fix for the given annotationpublic boolean canAssist(IQuickAssistInvocationContext invocationContext)
IQuickAssistAssistant
canAssist in interface IQuickAssistAssistantinvocationContext - the invocation context
true if the assistant has a fix for the given annotationpublic void install(ISourceViewer sourceViewer)
IQuickAssistAssistant
Note: This quick assist assistant will only be able to query the invocation context
if sourceViewer also implements ISourceViewerExtension3.
install in interface IQuickAssistAssistantsourceViewer - the source viewer on which quick assist will workpublic void setInformationControlCreator(IInformationControlCreator creator)
IQuickAssistAssistant
setInformationControlCreator in interface IQuickAssistAssistantcreator - the information control creator for the additional information controlpublic void uninstall()
IQuickAssistAssistant
uninstall in interface IQuickAssistAssistantpublic void setProposalSelectorBackground(Color background)
IQuickAssistAssistant
Note: As of 3.4, you should only call this
method if you want to override the JFacePreferences.CONTENT_ASSIST_BACKGROUND_COLOR.
setProposalSelectorBackground in interface IQuickAssistAssistantbackground - the background colorpublic void setProposalSelectorForeground(Color foreground)
IQuickAssistAssistant
Note: As of 3.4, you should only call this
method if you want to override the JFacePreferences.CONTENT_ASSIST_FOREGROUND_COLOR.
setProposalSelectorForeground in interface IQuickAssistAssistantforeground - the foreground colorpublic void setRestoreCompletionProposalSize(IDialogSettings dialogSettings)
Note: This API is only valid if the information control implements
IInformationControlExtension3. Not following this restriction
will later result in an UnsupportedOperationException.
The constants used to store the values are:
dialogSettings - the dialog settingsprotected void possibleCompletionsClosed()
public void addCompletionListener(ICompletionListener listener)
IQuickAssistAssistant
addCompletionListener in interface IQuickAssistAssistantlistener - the listenerpublic void removeCompletionListener(ICompletionListener listener)
IQuickAssistAssistant
removeCompletionListener in interface IQuickAssistAssistantlistener - the listener to removepublic void setStatusLineVisible(boolean show)
IQuickAssistAssistantIQuickAssistAssistant.setStatusMessage(String).
setStatusLineVisible in interface IQuickAssistAssistantshow - true to show a message line, false to not show one.public void setStatusMessage(String message)
IQuickAssistAssistant
setStatusMessage in interface IQuickAssistAssistantmessage - the messagepublic final IHandler getHandler(String commandId)
The same handler instance will be returned when called a more than once with the same command identifier.
getHandler in interface IQuickAssistAssistantExtensioncommandId - the command identifier
protected void hide()
public void enableColoredLabels(boolean isEnabled)
Completion proposals can implement ICompletionProposalExtension6
to provide colored proposal labels.
enableColoredLabels in interface IQuickAssistAssistantExtensionisEnabled - if true the support for colored labels is enabled in the proposal popup
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.