Eclipse JDT
2.0

org.eclipse.jdt.core
Class CorrectionEngine

java.lang.Object
  |
  +--org.eclipse.jdt.core.CorrectionEngine
All Implemented Interfaces:
org.eclipse.jdt.internal.compiler.lookup.ProblemReasons

public class CorrectionEngine
extends Object
implements org.eclipse.jdt.internal.compiler.lookup.ProblemReasons

This class is the entry point for source corrections. This class is not intended to be subclassed by clients. This class is intended to be instantiated by clients.

Since:
2.0

Field Summary
protected static int CLASSES
          This field is not intended to be used by client.
protected  ICompletionRequestor completionRequestor
          This field is not intended to be used by client.
protected  int correctionEnd
          This field is not intended to be used by client.
protected  int correctionStart
          This field is not intended to be used by client.
protected static int FIELD
          This field is not intended to be used by client.
protected  int filter
          This field is not intended to be used by client.
protected static int IMPORT
          This field is not intended to be used by client.
protected static int INTERFACES
          This field is not intended to be used by client.
protected static int LOCAL
          This field is not intended to be used by client.
protected static int METHOD
          This field is not intended to be used by client.
protected  int prefixLength
          This field is not intended to be used by client.
protected  ICorrectionRequestor requestor
          This field is not intended to be used by client.
protected  ICompilationUnit unit
          This field is not intended to be used by client.
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.lookup.ProblemReasons
Ambiguous, InheritedNameHidesEnclosingName, InternalNameProvided, NoError, NonStaticReferenceInConstructorInvocation, NonStaticReferenceInStaticContext, NotFound, NotVisible
 
Constructor Summary
CorrectionEngine(Map setting)
          The CorrectionEngine is responsible for computing problem corrections.
 
Method Summary
 void computeCorrections(IMarker marker, ICompilationUnit targetUnit, int positionOffset, ICorrectionRequestor requestor)
          Performs code correction for the given marker, reporting results to the given correction requestor.
 void computeCorrections(IProblem problem, ICompilationUnit targetUnit, ICorrectionRequestor requestor)
          Performs code correction for the given IProblem, reporting results to the given correction requestor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

correctionStart

protected int correctionStart
This field is not intended to be used by client.


correctionEnd

protected int correctionEnd
This field is not intended to be used by client.


prefixLength

protected int prefixLength
This field is not intended to be used by client.


unit

protected ICompilationUnit unit
This field is not intended to be used by client.


requestor

protected ICorrectionRequestor requestor
This field is not intended to be used by client.


CLASSES

protected static final int CLASSES
This field is not intended to be used by client.

See Also:
Constant Field Values

INTERFACES

protected static final int INTERFACES
This field is not intended to be used by client.

See Also:
Constant Field Values

IMPORT

protected static final int IMPORT
This field is not intended to be used by client.

See Also:
Constant Field Values

METHOD

protected static final int METHOD
This field is not intended to be used by client.

See Also:
Constant Field Values

FIELD

protected static final int FIELD
This field is not intended to be used by client.

See Also:
Constant Field Values

LOCAL

protected static final int LOCAL
This field is not intended to be used by client.

See Also:
Constant Field Values

filter

protected int filter
This field is not intended to be used by client.


completionRequestor

protected ICompletionRequestor completionRequestor
This field is not intended to be used by client.

Constructor Detail

CorrectionEngine

public CorrectionEngine(Map setting)
The CorrectionEngine is responsible for computing problem corrections.

Parameters:
setting - java.util.Map set of options used to configure the code correction engine. CURRENTLY THERE IS NO CORRECTION SPECIFIC SETTINGS.
Method Detail

computeCorrections

public void computeCorrections(IMarker marker,
                               ICompilationUnit targetUnit,
                               int positionOffset,
                               ICorrectionRequestor requestor)
                        throws JavaModelException
Performs code correction for the given marker, reporting results to the given correction requestor. Correction results are answered through a requestor.

Parameters:
marker - the marker which describe the problem to correct.
targetUnit - replace the compilation unit given by the marker. Ignored if null.
positionOffset - the offset of position given by the marker.
Throws:
IllegalArgumentException - if requestor is null
JavaModelException - currently this exception is never thrown, but the opportunity to thrown an exception when the correction failed is kept for later.
Since:
2.0

computeCorrections

public void computeCorrections(IProblem problem,
                               ICompilationUnit targetUnit,
                               ICorrectionRequestor requestor)
                        throws JavaModelException
Performs code correction for the given IProblem, reporting results to the given correction requestor. Correction results are answered through a requestor.

Parameters:
problem - the problem which describe the problem to correct.
targetUnit - denote the compilation unit in which correction occurs. Cannot be null.
Throws:
IllegalArgumentException - if targetUnit or requestor is null
JavaModelException - currently this exception is never thrown, but the opportunity to thrown an exception when the correction failed is kept for later.
Since:
2.0

Eclipse JDT
2.0

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