Eclipse JDT
Release 3.0

org.eclipse.jdt.ui.text.java
Interface IQuickFixProcessor


public interface IQuickFixProcessor

Interface to be implemented by contributors to the extension point org.eclipse.jdt.ui.quickFixProcessors.

Since:
3.0

Method Summary
 IJavaCompletionProposal[] getCorrections(IInvocationContext context, IProblemLocation[] locations)
          Collects corrections or code manipulations for the given context.
 boolean hasCorrections(ICompilationUnit unit, int problemId)
          Returns true if the processor has proposals for the given problem.
 

Method Detail

hasCorrections

public boolean hasCorrections(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.

Parameters:
unit - the compilation unit
problemId - the problem Id
Returns:
true if the processor has proposals for the given problem

getCorrections

public IJavaCompletionProposal[] getCorrections(IInvocationContext context,
                                                IProblemLocation[] locations)
                                         throws CoreException
Collects corrections or code manipulations for the given context.

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:
CoreException - CoreException can be thrown if the operation fails

Eclipse JDT
Release 3.0

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.