org.eclipse.cdt.ui.text.contentassist
Interface ICompletionProposalComputer

All Known Implementing Classes:
DOMCompletionProposalComputer, HelpCompletionProposalComputer, HippieProposalComputer, KeywordCompletionProposalComputer, LegacyCompletionProposalComputer, ParsingBasedProposalComputer, TemplateCompletionProposalComputer

public interface ICompletionProposalComputer

Computes completions and context information displayed by the C/C++ editor content assistant. Contributions to the org.eclipse.cdt.ui.completionProposalComputer extension point must implement this interface.

Since:
4.0

Method Summary
 java.util.List computeCompletionProposals(ContentAssistInvocationContext context, org.eclipse.core.runtime.IProgressMonitor monitor)
          Returns a list of completion proposals valid at the given invocation context.
 java.util.List computeContextInformation(ContentAssistInvocationContext 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

sessionStarted

void sessionStarted()
Informs the computer that a content assist session has started. This call will always be followed by a sessionEnded() call, but not necessarily by calls to computeCompletionProposals or computeContextInformation.


computeCompletionProposals

java.util.List computeCompletionProposals(ContentAssistInvocationContext 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: ICompletionProposal)

computeContextInformation

java.util.List computeContextInformation(ContentAssistInvocationContext context,
                                         org.eclipse.core.runtime.IProgressMonitor monitor)
Returns context information objects 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 context information objects (element type: IContextInformation)

getErrorMessage

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

Returns:
an error message or null if no error occurred

sessionEnded

void sessionEnded()
Informs the computer that a content assist session has ended. This call will always be after any calls to computeCompletionProposals and computeContextInformation.