|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extension interface to ICompletionProposal
.
Add the following functions:
Method Summary | |
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. |
Method Detail |
public void apply(ITextViewer viewer, char trigger, int stateMask, int offset)
isValidFor
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 activatedpublic void selected(ITextViewer viewer, boolean smartToggle)
viewer
- the text viewer.smartToggle
- the smart toggle key was pressedpublic void unselected(ITextViewer viewer)
viewer
- the text viewer.public 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 deprecates ICompletionProposalExtension.isValidFor(IDocument, int)document
- the documentoffset
- the caret offsetevent
- the document event, may be null
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |