Interface IQuickAssistProcessor


public interface IQuickAssistProcessor
Interface to be implemented by contributors to the extension point org.eclipse.jdt.ui.quickAssistProcessors.
Since:
3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    getAssists(org.eclipse.jdt.ui.text.java.IInvocationContext context, org.eclipse.jdt.ui.text.java.IProblemLocation[] locations)
    Collects quick assists for the given context.
    boolean
    hasAssists(org.eclipse.jdt.ui.text.java.IInvocationContext context)
    Evaluates if quick assists can be created for the given context.
  • Method Details

    • hasAssists

      boolean hasAssists(org.eclipse.jdt.ui.text.java.IInvocationContext context) throws org.eclipse.core.runtime.CoreException
      Evaluates if quick assists can be created for the given context. This evaluation must be precise.
      Parameters:
      context - The invocation context
      Returns:
      Returns true if quick assists can be created
      Throws:
      org.eclipse.core.runtime.CoreException - CoreException can be thrown if the operation fails
    • getAssists

      IJavaCompletionProposal[] getAssists(org.eclipse.jdt.ui.text.java.IInvocationContext context, org.eclipse.jdt.ui.text.java.IProblemLocation[] locations) throws org.eclipse.core.runtime.CoreException
      Collects quick assists for the given context.
      Parameters:
      context - Defines current compilation unit, position and a shared AST
      locations - The locations of problems at the invocation offset. The processor can decide to only add assists when there are no errors at the selection offset.
      Returns:
      Returns the assists applicable at the location or null if no proposals can be offered.
      Throws:
      org.eclipse.core.runtime.CoreException - CoreException can be thrown if the operation fails