|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.jsdt.core.compiler.ReconcileContext
public class ReconcileContext
The context of a reconcile event that is notified to interested validation participants while a reconcile operation is running.
A reconcile participant can get the AST for the reconcile-operation using
getAST3()
. If the participant modifies in any way the AST
(either by modifying the source of the working copy, or modifying another entity
that would result in different bindings for the AST), it is expected to reset the
AST in the context using resetAST()
.
A reconcile participant can also create and return problems using
putProblems(String, CategorizedProblem[])
. These problems are then reported
to the problem requestor of the reconcile operation.
This class is not intended to be instanciated or subclassed by clients.
Provisional API: This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.
Constructor Summary | |
---|---|
ReconcileContext(org.eclipse.wst.jsdt.internal.core.ReconcileWorkingCopyOperation operation,
org.eclipse.wst.jsdt.internal.core.CompilationUnit workingCopy)
Creates a reconcile context for the given reconcile operation. |
Method Summary | |
---|---|
JavaScriptUnit |
getAST3()
Returns a resolved AST with JLS3 level. |
int |
getASTLevel()
Returns the AST level requested by the reconcile operation. |
IJavaScriptElementDelta |
getDelta()
Returns the delta describing the change to the working copy being reconciled. |
CategorizedProblem[] |
getProblems(java.lang.String markerType)
Returns the problems to be reported to the problem requester of the reconcile operation for the given marker type. |
IJavaScriptUnit |
getWorkingCopy()
Returns the working copy this context refers to. |
boolean |
isResolvingBindings()
Returns whether the reconcile operation is resolving bindings. |
void |
putProblems(java.lang.String markerType,
CategorizedProblem[] problems)
Sets the problems to be reported to the problem requester of the reconcile operation for the given marker type. |
void |
resetAST()
Resets the AST carried by this context. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReconcileContext(org.eclipse.wst.jsdt.internal.core.ReconcileWorkingCopyOperation operation, org.eclipse.wst.jsdt.internal.core.CompilationUnit workingCopy)
This constructor is not intended to be called by clients.
operation
- the reconcile operationMethod Detail |
---|
public JavaScriptUnit getAST3() throws JavaScriptModelException
JLS3
level.
It is created from the current state of the working copy.
Creates one if none exists yet.
Returns null
if the current state of the working copy
doesn't allow the AST to be created (e.g. if the working copy's content
cannot be parsed).
If the AST level requested during reconciling is not AST.JLS3
or if binding resolutions was not requested, then a different AST is created.
Note that this AST does not become the current AST and it is only valid for
the requestor.
null
if none could be created
JavaScriptModelException
- if the contents of the working copy
cannot be accessed. Reasons include:
public int getASTLevel()
IJavaScriptUnit.NO_AST
, or one of the JLS constants defined on AST
.
public boolean isResolvingBindings()
public IJavaScriptElementDelta getDelta()
null
if there is no change.
Note that the delta's AST is not yet positioned at this stage. Use getAST3()
to get the current AST.
null
if nonepublic CategorizedProblem[] getProblems(java.lang.String markerType)
null
if no problems need to be reported for this marker type.
markerType
- the given marker type
public IJavaScriptUnit getWorkingCopy()
public void resetAST()
Note that resetting the AST will not restart the reconcile process. Only further participants will see the new AST. Thus participants running before the one that resets the AST will have a stale view of the AST and its problems. Use the validation participant extension point to order the participants.
public void putProblems(java.lang.String markerType, CategorizedProblem[] problems)
null
indicates that no problems need to be reported.
Using this functionality, a participant that resolves problems for a given marker type can hide those problems since they don't exist any longer.
markerType
- the marker type of the given problemsproblems
- the problems to be reported to the problem requester of the reconcile operation,
or null
if none
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |