|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extends ICompletionProposal
with 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)
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 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 replaces ICompletionProposalExtension.isValidFor(IDocument, int)
document
- the documentoffset
- the caret offsetevent
- the document event, may be null
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.