com.ibm.systemz.common.editor.extensionpoints.contentassist
Interface ICompletionProposalComputer


public interface ICompletionProposalComputer

Computes completions and context information displayed by editor content assistants for the COBOL, PL/I, and JCL languages. Contributions to the com.ibm.systemz.editor.completionProposalComputer extension point must implement this interface.


Method Summary
 java.util.List<SimpleCompletionProposal> computeCompletionProposals(IContentAssistInvocationContext context, org.eclipse.core.runtime.IProgressMonitor monitor)
          Returns a list of completion proposals valid at the given invocation context.
 java.util.List<org.eclipse.jface.text.contentassist.IContextInformation> computeContextInformation(IContentAssistInvocationContext context, org.eclipse.core.runtime.IProgressMonitor monitor)
          Returns context information objects valid at the given invocation context.
 java.lang.String getErrorMessage()
          Returns the reason why this computer was unable to produce any completion proposals or context information.
 void sessionEnded()
          Informs the computer that a content assist session has ended.
 void sessionStarted()
          Informs the computer that a content assist session has started.
 

Method Detail

computeCompletionProposals

java.util.List<SimpleCompletionProposal> computeCompletionProposals(IContentAssistInvocationContext context,
                                                                    org.eclipse.core.runtime.IProgressMonitor monitor)
Returns a list of completion proposals valid at the given invocation context.

Parameters:
context - the context of the content assist invocation
monitor - a progress monitor to report progress. The monitor is private to this invocation, i.e. there is no need for the receiver to spawn a sub monitor.
Returns:
a list of completion proposals (element type: SimpleCompletionProposal)

computeContextInformation

java.util.List<org.eclipse.jface.text.contentassist.IContextInformation> computeContextInformation(IContentAssistInvocationContext context,
                                                                                                   org.eclipse.core.runtime.IProgressMonitor monitor)

Returns context information objects valid at the given invocation context.

A good example of Context Information objects are the parameter assistance displays in the Java Editor when entering parameters into a method invocation.

It is recommended for the returned objects to implement IContextInformationExtension and override their equals() methods to prevent duplicate contexts from being displayed. Returned objects may additionally implement IContextInformationValidator to override when the displayed context information is dismissed, and IContextInformationPresenter to add text styling to the presentation.

To see an example of Context Information, type ctrl+shift+space while using the Java Editor when the caret is on a method name.

Parameters:
context - the context of the content assist invocation
monitor - a progress monitor to report progress. The monitor is private to this invocation, i.e. there is no need for the receiver to spawn a sub monitor.
Returns:
a list of context information objects (element type: IContextInformation)

sessionStarted

void sessionStarted()
Informs the computer that a content assist session has started.


sessionEnded

void sessionEnded()
Informs the computer that a content assist session has ended.


getErrorMessage

java.lang.String getErrorMessage()
Returns the reason why this computer was unable to produce any completion proposals or context information.

Returns:
the error message