public interface ICompletionProposalExtension2
ICompletionProposal
with the following functions:
| Modifier and Type | Method and Description |
|---|---|
void |
apply(ITextViewer viewer,
char trigger,
int stateMask,
int offset)
Applies the proposed completion to the given document.
|
void |
selected(ITextViewer viewer,
boolean smartToggle)
Called when the proposal is selected.
|
void |
unselected(ITextViewer viewer)
Called when the proposal is unselected.
|
boolean |
validate(IDocument document,
int offset,
DocumentEvent event)
Requests the proposal to be validated with respect to the document event.
|
void apply(ITextViewer viewer, char trigger, int stateMask, int offset)
validate(IDocument, int, DocumentEvent)
returns true if called for offset.viewer - the text viewer into which to insert the proposed completiontrigger - the trigger to apply the completionstateMask - the state mask of the modifiersoffset - the offset at which the trigger has been activatedvoid selected(ITextViewer viewer, boolean smartToggle)
viewer - the text viewer.smartToggle - the smart toggle key was pressedvoid unselected(ITextViewer viewer)
viewer - the text viewer.boolean validate(IDocument document, int offset, DocumentEvent event)
false.
If the document event was null, only the caret offset was changed, but not the document.
This method replaces ICompletionProposalExtension.isValidFor(IDocument, int)document - the documentoffset - the caret offsetevent - the document event, may be nullGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.