Package ro.sync.exml.editor.quickassist
Interface IQuickAssistProposal<I>
-
- Type Parameters:
I
- The Image type.
- All Superinterfaces:
InlineProposal
- All Known Subinterfaces:
SAQuickAssistProposal
@API(type=INTERNAL, src=PUBLIC) public interface IQuickAssistProposal<I> extends InlineProposal
The interface of completion proposals generated by content assist processors. A completion proposal contains information used to present the proposed completion to the user, to insert the completion should the user select it, and to present context information for the chosen completion once it has been inserted.
-
-
Field Summary
-
Fields inherited from interface ro.sync.contentcompletion.editor.InlineProposal
HIGH_IMPORTANCE, LOW_IMPORTANCE, NORMAL_IMPORTANCE, PRESENT_NORMALLY, PRESENT_VERY_FIRST, UNRECOMMENDED_IMPORTANCE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
apply()
Inserts the proposed completion into the given document.I
getImage()
Returns the image to be displayed in the list of completion proposals.QuickAssistProposalGroup
getParentGroup()
int[]
getSelection()
Returns the new selection after the proposal has been applied to the given document in absolute document coordinates.boolean
isQuickFix()
-
Methods inherited from interface ro.sync.contentcompletion.editor.InlineProposal
compareTo, getDocumentation, getImportance, getPresentPosition, getRenderString, getStringForFilter
-
-
-
-
Method Detail
-
apply
void apply()
Inserts the proposed completion into the given document.
-
getSelection
int[] getSelection()
Returns the new selection after the proposal has been applied to the given document in absolute document coordinates. If it returnsnull
, no new selection is set. A document change can trigger other document changes, which have to be taken into account when calculating the new selection. Typically, this would be done by installing a document listener or by using a document position duringapply()
.- Returns:
- the new selection in absolute document coordinates
-
getImage
I getImage()
Returns the image to be displayed in the list of completion proposals. The image would typically be shown to the left of the display string.- Returns:
- the image to be shown or
null
if no image is desired
-
getParentGroup
QuickAssistProposalGroup getParentGroup()
- Returns:
- The parent group of the proposal.
-
isQuickFix
boolean isQuickFix()
- Returns:
- Return true if this proposal is associated with a quick fix.
-
-