Package com.iizigo.java.assist
Class JavaCodeCompletion
java.lang.Object
com.iizigo.java.assist.JavaCodeCompletion
- All Implemented Interfaces:
org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer
public class JavaCodeCompletion extends Object implements org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer
The Code Completion for Java code that handles String's and Annotations.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionList<org.eclipse.jface.text.contentassist.ICompletionProposal>computeCompletionProposals(org.eclipse.jdt.ui.text.java.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(org.eclipse.jdt.ui.text.java.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.voidInforms the computer that a content assist session has ended.voidInforms the computer that a content assist session has started.
Constructor Details
JavaCodeCompletion
public JavaCodeCompletion()Default Eclipse constructor.
Method Details
sessionStarted
public 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.- Specified by:
sessionStartedin interfaceorg.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer
computeCompletionProposals
public List<org.eclipse.jface.text.contentassist.ICompletionProposal> computeCompletionProposals(org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext context, org.eclipse.core.runtime.IProgressMonitor monitor) Returns a list of completion proposals valid at the given invocation context.- Specified by:
computeCompletionProposalsin interfaceorg.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer- 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
public List<org.eclipse.jface.text.contentassist.IContextInformation> computeContextInformation(org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext context, org.eclipse.core.runtime.IProgressMonitor monitor) Returns context information objects valid at the given invocation context.- Specified by:
computeContextInformationin interfaceorg.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer- 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
Returns the reason why this computer was unable to produce any completion proposals or context information.- Specified by:
getErrorMessagein interfaceorg.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer- Returns:
- An error message or
nullif no error occurred.
sessionEnded
public void sessionEnded()Informs the computer that a content assist session has ended. This call will always be after any calls to computeCompletionProposals and computeContextInformation.- Specified by:
sessionEndedin interfaceorg.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer