Package org.eclipse.jface.text.source
Class ContentAssistantFacade
- java.lang.Object
-
- org.eclipse.jface.text.source.ContentAssistantFacade
-
public final class ContentAssistantFacade extends Object
Facade to allow minimal access to the given content assistant.The offered API access can grow over time.
- Since:
- 3.4
-
-
Constructor Summary
Constructors Constructor Description ContentAssistantFacade(IContentAssistant contentAssistant)Creates a new facade.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCompletionListener(ICompletionListener listener)Adds a completion listener that will be informed before proposals are computed.IHandlergetHandler(String commandId)Returns the handler for the given command identifier.voidremoveCompletionListener(ICompletionListener listener)Removes a completion listener.
-
-
-
Constructor Detail
-
ContentAssistantFacade
public ContentAssistantFacade(IContentAssistant contentAssistant)
Creates a new facade.- Parameters:
contentAssistant- the content assistant which implementsIContentAssistantExtension2andIContentAssistantExtension4
-
-
Method Detail
-
getHandler
public IHandler getHandler(String commandId)
Returns 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.
- Parameters:
commandId- the command identifier- Returns:
- the handler for the given command identifier
- Throws:
IllegalArgumentException- if the command is not supported by this content assistantIllegalStateException- if called when the content assistant is uninstalled
-
addCompletionListener
public void addCompletionListener(ICompletionListener listener)
Adds a completion listener that will be informed before proposals are computed.- Parameters:
listener- the listener- Throws:
IllegalStateException- if called when the content assistant is uninstalled
-
removeCompletionListener
public void removeCompletionListener(ICompletionListener listener)
Removes a completion listener.- Parameters:
listener- the listener to remove- Throws:
IllegalStateException- if called when the content assistant is uninstalled
-
-