|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.lpex.alef.contentassist.ContentAssistant
An LPEX-based implementation of the IContentAssistant
interface.
Usually, clients instantiate this class and configure it before using it.
Field Summary | |
static int |
LAYOUT_CONTEXT_INFO_POPUP
|
static int |
LAYOUT_CONTEXT_SELECTOR
|
static int |
LAYOUT_PROPOSAL_SELECTOR
|
Fields inherited from interface com.ibm.lpex.alef.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)
Sets the content assistant's auto activation state. |
IContentAssistProcessor |
getContentAssistProcessor(java.lang.String contentType)
Return the content assist processor which was registered to be used for the given content type. |
void |
install(org.eclipse.jface.text.ITextViewer textViewer)
Installs content assist support on the given text viewer. |
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,
java.lang.String contentType)
Registers a given content assist processor for a particular content type. |
void |
setContextInformationPopupBackground(org.eclipse.swt.graphics.Color background)
Sets the context information popup's background color. |
void |
setContextInformationPopupOrientation(int orientation)
Sets the context information popup's orientation The following values may be used: CONTEXT_ABOVE |
void |
setProposalPopupOrientation(int orientation)
Sets the proposal popups' orientation The following values may be used: PROPOSAL_OVERLAY |
java.lang.String |
showContextInformation()
Shows context information for the content at the viewer's cursor position. |
java.lang.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 |
Field Detail |
public static final int LAYOUT_PROPOSAL_SELECTOR
public static final int LAYOUT_CONTEXT_SELECTOR
public static final int LAYOUT_CONTEXT_INFO_POPUP
Constructor Detail |
public ContentAssistant()
Method Detail |
public void setContentAssistProcessor(IContentAssistProcessor processor, java.lang.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(java.lang.String contentType)
getContentAssistProcessor
in interface IContentAssistant
IContentAssistant.getContentAssistProcessor(java.lang.String)
public void enableAutoActivation(boolean enabled)
enabled
- indicates whether auto activation 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(org.eclipse.swt.graphics.Color background)
background
- the background colorpublic void install(org.eclipse.jface.text.ITextViewer textViewer)
IContentAssistant
install
in interface IContentAssistant
com.ibm.lpex.alef.contentassist.IContentAssistant
textViewer
- the text viewer on which content assist will workpublic void uninstall()
IContentAssistant
uninstall
in interface IContentAssistant
public java.lang.String showPossibleCompletions()
IContentAssistant
showPossibleCompletions
in interface IContentAssistant
com.ibm.lpex.alef.contentassist.IContentAssistant
public java.lang.String showContextInformation()
IContentAssistant
showContextInformation
in interface IContentAssistant
com.ibm.lpex.alef.contentassist.IContentAssistant
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |