Interface IFixManager


  • public interface IFixManager
    Quick fix management facility. Provides start/end points for initiating/performing/finishing the quick fix pcocess
    • Method Detail

      • prepareFix

        FixProcessHandle prepareFix​(IMarkerWrapper marker,
                                    IDtProject dtProject)
        Prepares the quick fix process for the problem being described by the given marker
        Parameters:
        marker - The marker to create the fix process for. May not be null
        Returns:
        The process handle if the system has a set of registered fixes for it. Empty Optional otherwise
      • getApplicableFixVariants

        Collection<FixVariantDescriptor> getApplicableFixVariants​(FixProcessHandle handle)
        Gets applicable fix variants for the given fix process. Variants are being checked for the applicability using the process context
        Parameters:
        handle - The process handle. May not be null
        Returns:
        The set of applicable variants. May not be null. May be empty
      • selectFixVariant

        void selectFixVariant​(FixVariantDescriptor descriptor,
                              FixProcessHandle handle)
        Selects the target fix variant from available set. The variant can't be changed after that
        Parameters:
        descriptor - The variant to select. May not be null. The variant should be a one from getApplicableFixVariants(FixProcessHandle) return list
        handle - The process handle. May not be null
      • executeFix

        void executeFix​(FixProcessHandle handle,
                        org.eclipse.core.runtime.IProgressMonitor progressMonitor)
        Executes the code of the quick fix
        Parameters:
        handle - the fix process handle, cannot be null
      • finishFix

        void finishFix​(FixProcessHandle handle)
        Finalizes the quick fix TODO: Check whether it's needed
        Parameters:
        handle - the fix process handle, cannot be null