public abstract class ProposalConflictHelper extends java.lang.Object implements IProposalConflictHelper
Abstract base implementation of the IProposalConflictHelper
that
deals with the node model to extract the previous sibling of the input source.
Implementors have to provide the semantics of existsConflict(String, String, ContentAssistContext)
.
They should consider to extend the
AntlrProposalConflictHelper
.
IProposalConflictHelper.NullHelper
Constructor and Description |
---|
ProposalConflictHelper() |
Modifier and Type | Method and Description |
---|---|
boolean |
existsConflict(INode lastCompleteNode,
int offset,
java.lang.String proposal,
ContentAssistContext context) |
boolean |
existsConflict(java.lang.String proposal,
ContentAssistContext context)
Returns
false if the proposal would corrupt the previous
input. |
abstract boolean |
existsConflict(java.lang.String lastCompleteText,
java.lang.String proposal,
ContentAssistContext context)
Returns
false if the proposal would corrupt the previous
input. |
public boolean existsConflict(java.lang.String proposal, ContentAssistContext context)
IProposalConflictHelper
false
if the proposal would corrupt the previous
input.existsConflict
in interface IProposalConflictHelper
proposal
- a possible proposal string. Is never null
.context
- the current content assist context. Is never null
.false
if the proposal would corrupt the current input.public abstract boolean existsConflict(java.lang.String lastCompleteText, java.lang.String proposal, ContentAssistContext context)
false
if the proposal would corrupt the previous
input.lastCompleteText
- the previous sibling in the input source. Is never null
but may be empty. However, the implementation of existsConflict(INode, int, String, ContentAssistContext)
will not pass empty strings by default but return false
instead.proposal
- a possible proposal string. Is never null
.context
- the current content assist context. Is never null
.false
if the proposal would corrupt the current input.public boolean existsConflict(INode lastCompleteNode, int offset, java.lang.String proposal, ContentAssistContext context)