LPEX
4.4.0

com.ibm.lpex.alef.contentassist
Interface ICompletionProposal

All Known Implementing Classes:
CompletionProposal

public interface ICompletionProposal

Interface for 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.

This interface can be implemented by clients. By default, clients use CompletionProposal as the standard implementer of this interface.

This is the LPEX version of org.eclipse.jface.text.contentassist.ICompletionProposal. It has a different apply() method, and drops method getSelection(IDocument).

See Also:
IContentAssistProcessor

Method Summary
 void apply(LpexTextViewer textViewer)
          Insert the proposed completion into the document of the given text viewer.
 String getAdditionalProposalInfo()
          Return optional additional information about the proposal.
 IContextInformation getContextInformation()
          Return optional context information associated with this proposal.
 String getDisplayString()
          Return the string to be displayed in the list of completion proposals.
 Image getImage()
          Return the image to be displayed in the list of completion proposals.
 

Method Detail

apply

void apply(LpexTextViewer textViewer)
Insert the proposed completion into the document of the given text viewer.

Parameters:
textViewer - the LpexTextViewer into whose document the proposed completion should be inserted

getAdditionalProposalInfo

String getAdditionalProposalInfo()
Return optional additional information about the proposal. The additional information will be presented to assist the user in deciding if the selected proposal is the desired choice.

Returns:
the additional information, or null

getDisplayString

String getDisplayString()
Return the string to be displayed in the list of completion proposals.

Returns:
the string to be displayed

getImage

Image getImage()
Return 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

getContextInformation

IContextInformation getContextInformation()
Return optional context information associated with this proposal. The context information will automatically be shown if the proposal has been applied.

Returns:
the context information for this proposal, or null

LPEX
4.4.0

Copyright � 2016 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.