Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse JDT
Release 3.5
Interface IQuickFixProcessor

public interface IQuickFixProcessor

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

Since 3.2, each extension specifies the marker types it can handle, and hasCorrections(ICompilationUnit, int) and getCorrections(IInvocationContext, IProblemLocation[]) are called if (and only if) quick fix is required for a problem of these types.

Note, if a extension does not specify marker types it will be only called for problem of type org.eclipse.jdt.core.problem, org.eclipse.jdt.core.buildpath_problem and org.eclipse.jdt.core.task; compatible with the behavior prior to 3.2


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


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.

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.
true if the processor has proposals for the given problem


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

context - Defines current compilation unit, position and a shared AST
locations - Problems are the current location.
the corrections applicable at the location or null if no proposals can be offered
CoreException - CoreException can be thrown if the operation fails

Eclipse JDT
Release 3.5

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

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire