Package org.eclipse.jdt.ui.text.java
Interface IJavaCompletionProposalComputer
public interface IJavaCompletionProposalComputer
Computes completions and context information displayed by the Java editor content assistant.
Contributions to the
org.eclipse.jdt.ui.javaCompletionProposalComputer
extension point
must implement this interface.- Since:
- 3.2
-
Method Summary
Modifier and TypeMethodDescriptionList<org.eclipse.jface.text.contentassist.ICompletionProposal>
computeCompletionProposals
(ContentAssistInvocationContext context, org.eclipse.core.runtime.IProgressMonitor monitor) Returns a list of completion proposals valid at the given invocation context.List<org.eclipse.jface.text.contentassist.IContextInformation>
computeContextInformation
(ContentAssistInvocationContext context, org.eclipse.core.runtime.IProgressMonitor monitor) Returns context information objects valid at the given invocation context.Returns the reason why this computer was unable to produce any completion proposals or context information.void
Informs the computer that a content assist session has ended.void
Informs the computer that a content assist session has started.
-
Method Details
-
sessionStarted
void sessionStarted()Informs the computer that a content assist session has started. This call will always be followed by asessionEnded()
call, but not necessarily by calls to computeCompletionProposals or computeContextInformation. -
computeCompletionProposals
List<org.eclipse.jface.text.contentassist.ICompletionProposal> 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 invocationmonitor
- 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
List<org.eclipse.jface.text.contentassist.IContextInformation> 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 invocationmonitor
- 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
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.
-