Class QuickFixProcessor

  • All Implemented Interfaces:
    org.eclipse.jdt.ui.text.java.IQuickFixProcessor

    public class QuickFixProcessor
    extends java.lang.Object
    implements org.eclipse.jdt.ui.text.java.IQuickFixProcessor
    The quick-fix processor for iizi.
    Author:
    Christopher Mindus
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      org.eclipse.jdt.ui.text.java.IJavaCompletionProposal[]getCorrections​(org.eclipse.jdt.ui.text.java.IInvocationContext context, org.eclipse.jdt.ui.text.java.IProblemLocation[] locations)
      Collects corrections or code manipulations for the given context.
      booleanhasCorrections​(org.eclipse.jdt.core.ICompilationUnit unit, int problemId)
      Returns true if the processor has proposals for the given problem.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QuickFixProcessor

        public QuickFixProcessor()
    • Method Detail

      • hasCorrections

        public boolean hasCorrections​(org.eclipse.jdt.core.ICompilationUnit unit,
                                      int problemId)
        Returns true if the processor has proposals for the given problem. This test should be an optimistic guess and be very cheap.
        Specified by:
        hasCorrections in interface org.eclipse.jdt.ui.text.java.IQuickFixProcessor
        Parameters:
        unit - The compilation unit.
        problemId - The problem Id. The id is of a problem of the problem type(s) this processor specified in the extension point.
        Returns:
        true if the processor has proposals for the given problem.
      • getCorrections

        public org.eclipse.jdt.ui.text.java.IJavaCompletionProposal[] getCorrections​(org.eclipse.jdt.ui.text.java.IInvocationContext context,
                                                                                     org.eclipse.jdt.ui.text.java.IProblemLocation[] locations)
                                                                              throws org.eclipse.core.runtime.CoreException
        Collects corrections or code manipulations for the given context.
        Specified by:
        getCorrections in interface org.eclipse.jdt.ui.text.java.IQuickFixProcessor
        Parameters:
        context - Defines current compilation unit, position and a shared AST.
        locations - Problems are the current location.
        Returns:
        The corrections 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.