|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.contentassist.ContentAssistant
The standard implementation of the IContentAssistant
interface.
Usually, clients instantiate this class and configure it before using it.
Field Summary |
Fields inherited from interface org.eclipse.jface.text.contentassist.IContentAssistant |
CONTEXT_INFO_ABOVE, CONTEXT_INFO_BELOW, PROPOSAL_OVERLAY, PROPOSAL_REMOVE, PROPOSAL_STACKED |
Constructor Summary | |
ContentAssistant()
Creates a new content assistant. |
Method Summary | |
void |
enableAutoActivation(boolean enabled)
Enables the content assistant's auto activation mode. |
void |
enableAutoInsert(boolean enabled)
Enables the content assistant's auto insertion mode. |
IContentAssistProcessor |
getContentAssistProcessor(String contentType)
Returns the content assist processor to be used for the given content type. |
void |
install(ITextViewer textViewer)
Installs content assist support on the given text viewer. |
boolean |
requestWidgetToken(IWidgetTokenOwner owner)
The given widget token owner requests the widget token back from this token keeper. |
void |
setAutoActivationDelay(int delay)
Sets the delay after which the content assistant is automatically invoked if the cursor is behind an auto activation character. |
void |
setContentAssistProcessor(IContentAssistProcessor processor,
String contentType)
Registers a given content assist processor for a particular content type. |
void |
setContextInformationPopupBackground(Color background)
Sets the context information popup's background color. |
void |
setContextInformationPopupForeground(Color foreground)
Sets the context information popup's foreground color. |
void |
setContextInformationPopupOrientation(int orientation)
Sets the context information popup's orientation. |
void |
setContextSelectorBackground(Color background)
Sets the context selector's background color. |
void |
setContextSelectorForeground(Color foreground)
Sets the context selector's foreground color. |
void |
setInformationControlCreator(IInformationControlCreator creator)
Sets the information control creator for the additional information control. |
void |
setProposalPopupOrientation(int orientation)
Sets the proposal popups' orientation. |
void |
setProposalSelectorBackground(Color background)
Sets the proposal selector's background color. |
void |
setProposalSelectorForeground(Color foreground)
Sets the proposal's foreground color. |
String |
showContextInformation()
Shows context information for the content at the viewer's cursor position. |
String |
showPossibleCompletions()
Shows all possible completions of the content at the viewer's cursor position. |
void |
uninstall()
Uninstalls content assist support from the text 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 ContentAssistant()
Method Detail |
public void setContentAssistProcessor(IContentAssistProcessor processor, String contentType)
processor
- the content assist processor to register, or null
to remove an existing onecontentType
- the content type under which to registerpublic IContentAssistProcessor getContentAssistProcessor(String contentType)
IContentAssistant
getContentAssistProcessor
in interface IContentAssistant
contentType
- the type of the content for which this
content assistant is to be requested
null
if none exists for the specified content typepublic void enableAutoActivation(boolean enabled)
enabled
- indicates whether auto activation is enabled or notpublic void enableAutoInsert(boolean enabled)
enabled
- indicates whether auto insertion is enabled or notpublic void setAutoActivationDelay(int delay)
delay
- the auto activation delaypublic void setProposalPopupOrientation(int orientation)
proposal popup windows should overlay each other
any currently shown proposal popup should be closed
proposal popup windows should be vertical stacked, with no overlap, beneath the line containing the current cursor location
orientation
- the popup's orientationpublic void setContextInformationPopupOrientation(int orientation)
context information popup should always appear above the line containing the current cursor location
context information popup should always appear below the line containing the current cursor location
orientation
- the popup's orientationpublic void setContextInformationPopupBackground(Color background)
background
- the background colorpublic void setContextInformationPopupForeground(Color foreground)
foreground
- the foreground colorpublic void setProposalSelectorBackground(Color background)
background
- the background colorpublic void setProposalSelectorForeground(Color foreground)
foreground
- the foreground colorpublic void setContextSelectorBackground(Color background)
background
- the background colorpublic void setContextSelectorForeground(Color foreground)
foreground
- the foreground colorpublic void setInformationControlCreator(IInformationControlCreator creator)
creator
- the information control creator for the additional information controlpublic void install(ITextViewer textViewer)
IContentAssistant
install
in interface IContentAssistant
textViewer
- the text viewer on which content assist will workpublic void uninstall()
IContentAssistant
uninstall
in interface IContentAssistant
public String showPossibleCompletions()
IContentAssistant
showPossibleCompletions
in interface IContentAssistant
public String showContextInformation()
IContentAssistant
showContextInformation
in interface IContentAssistant
public boolean requestWidgetToken(IWidgetTokenOwner owner)
IWidgetTokenKeeper
true
if the token is released
by this token keeper. Note, the keeper must not call
releaseWidgetToken(IWidgetTokenKeeper)
explicitly.
requestWidgetToken
in interface IWidgetTokenKeeper
owner
- the token owner
true
if token has been released false
otherwise
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |