LPEX
4.4.0

com.ibm.lpex.alef.contentassist
Class ContextInformationValidator

java.lang.Object
  extended by com.ibm.lpex.alef.contentassist.ContextInformationValidator
All Implemented Interfaces:
IContextInformationValidator

public final class ContextInformationValidator
extends Object
implements IContextInformationValidator

A default LPEX implementation of the 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 Summary
ContextInformationValidator(IContentAssistProcessor processor)
          Create a new context information validator which is ready to be installed on a particular context information.
 
Method Summary
 void install(IContextInformation contextInformation, ITextViewer viewer, LpexDocumentLocation location)
          Install this validator for the given context information.
 boolean isContextInformationValid(LpexDocumentLocation location)
          Return whether the information that this validator is installed on, is still valid at the current document location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextInformationValidator

public ContextInformationValidator(IContentAssistProcessor processor)
Create a new context information validator which is ready to be installed on a particular context information.

Parameters:
processor - the processor to be used for validation
Method Detail

install

public void install(IContextInformation contextInformation,
                    ITextViewer viewer,
                    LpexDocumentLocation location)
Install this validator for the given context information.

Specified by:
install in interface IContextInformationValidator
Parameters:
contextInformation - the context information which this validator should check
viewer - the LpexTextViewer on which the information is presented
location - the document location for which the information has been computed
See Also:
IContextInformationValidator.install(IContextInformation,ITextViewer,LpexDocumentLocation)

isContextInformationValid

public boolean isContextInformationValid(LpexDocumentLocation location)
Return whether the information that this validator is installed on, is still valid at the current document location.

Specified by:
isContextInformationValid in interface IContextInformationValidator
Parameters:
location - the current document location
Returns:
true if the information is also valid at the given document location
See Also:
IContextInformationValidator.isContextInformationValid(LpexDocumentLocation)

LPEX
4.4.0

Copyright � 2016 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.