public class SmartInformationAwareContextInformationValidator
extends java.lang.Object
implements org.eclipse.jface.text.contentassist.IContextInformationValidator, org.eclipse.jface.text.contentassist.IContextInformationPresenter
IContextInfomationValidator
interface.
This implementation tries to use ISmartContextInformation
to determine
the validity of the information. If this interface is not fulfilled,
it determines whether the information is valid by asking the content
assist processor for all context information objects for the current position. If the
currently displayed information is in the result set, the context information is
considered valid.ContextInformationValidator
Constructor and Description |
---|
SmartInformationAwareContextInformationValidator(org.eclipse.jface.text.contentassist.IContentAssistProcessor processor)
Creates a new context information validator which is ready to be installed on
a particular context information.
|
Modifier and Type | Method and Description |
---|---|
void |
install(org.eclipse.jface.text.contentassist.IContextInformation contextInformation,
org.eclipse.jface.text.ITextViewer viewer,
int offset) |
boolean |
isContextInformationValid(int offset) |
boolean |
updatePresentation(int offset,
org.eclipse.jface.text.TextPresentation presentation) |
public SmartInformationAwareContextInformationValidator(org.eclipse.jface.text.contentassist.IContentAssistProcessor processor)
processor
- the processor to be used for validationpublic void install(org.eclipse.jface.text.contentassist.IContextInformation contextInformation, org.eclipse.jface.text.ITextViewer viewer, int offset)
install
in interface org.eclipse.jface.text.contentassist.IContextInformationPresenter
install
in interface org.eclipse.jface.text.contentassist.IContextInformationValidator
public boolean isContextInformationValid(int offset)
isContextInformationValid
in interface org.eclipse.jface.text.contentassist.IContextInformationValidator
public boolean updatePresentation(int offset, org.eclipse.jface.text.TextPresentation presentation)
updatePresentation
in interface org.eclipse.jface.text.contentassist.IContextInformationPresenter