public final class ContextInformationValidator extends Object implements IContextInformationValidator
IContextInfomationValidator interface.
This implementation 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.| Constructor and Description |
|---|
ContextInformationValidator(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(IContextInformation contextInformation,
ITextViewer viewer,
int offset)
Installs this validator for the given context information.
|
boolean |
isContextInformationValid(int offset)
Returns whether the information this validator is installed on is still valid
at the given document position.
|
public ContextInformationValidator(IContentAssistProcessor processor)
processor - the processor to be used for validationpublic void install(IContextInformation contextInformation, ITextViewer viewer, int offset)
IContextInformationValidatorinstall in interface IContextInformationValidatorcontextInformation - the context information which this validator should checkviewer - the text viewer on which the information is presentedoffset - the document offset for which the information has been computedpublic boolean isContextInformationValid(int offset)
IContextInformationValidatorisContextInformationValid in interface IContextInformationValidatoroffset - the current offset within the documenttrue if the information also valid at the given document positionGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.