SWT LPEX
v3.0.5

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 choosen completion once it has been inserted.

The 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.

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

public 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

public 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

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

Returns:
the string to be displayed

getImage

public 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

public 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

SWT LPEX
v3.0.5

(C) Copyright IBM Corporation 1998, 2005.  All Rights Reserved.