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 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 a sessionEnded() call, but not necessarily by calls to computeCompletionProposals or computeContextInformation.
      Specified by:
      sessionStarted in interface org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer
    • computeCompletionProposals

      public List<ICompletionProposal> computeCompletionProposals(org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext context, IProgressMonitor monitor)
      Returns a list of completion proposals valid at the given invocation context.
      Specified by:
      computeCompletionProposals in interface org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer
      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

      public List<IContextInformation> computeContextInformation(org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext context, IProgressMonitor monitor)
      Returns context information objects valid at the given invocation context.
      Specified by:
      computeContextInformation in interface org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer
      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

      public String getErrorMessage()
      Returns the reason why this computer was unable to produce any completion proposals or context information.
      Specified by:
      getErrorMessage in interface org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer
      Returns:
      An error message or null if 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:
      sessionEnded in interface org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer