public static class ISourceFileImplSupport.NotifyingReconcileOperation extends ISourceFileImplSupport.ReconcileOperation
This class or a subclass of this class are not intended to be used by
clients for purposes other than extension or instance creation;
instances of this class or a subclass of this class are not intended
to be used by clients for purposes other than returning from getReconcileOperation_()
.
INotificationManager
sourceFile
Modifier | Constructor and Description |
---|---|
protected |
NotifyingReconcileOperation(ISourceFileImplSupport sourceFile)
Constructs a notifying reconcile operation for the given source file.
|
Modifier and Type | Method and Description |
---|---|
protected ElementChangeRecorder |
newChangeRecorder()
Returns a new instance of element change recorder for this operation.
|
protected void |
reconcile(IContext context,
org.eclipse.core.runtime.IProgressMonitor monitor)
Reconciles the working copy according to options specified
in the given context.
|
isInitialReconcile, isReconcilingForced, reconcileStructure, shouldReconcileStructure
protected NotifyingReconcileOperation(ISourceFileImplSupport sourceFile)
sourceFile
- not null
protected void reconcile(IContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
The following context options, if simultaneously present, must be mutually consistent:
ISourceFileImplSupport.SOURCE_AST
- Specifies the AST to use when reconciling.
The AST is safe to read in the dynamic context of this method call,
but must not be modified.
ISourceFileImplSupport.SOURCE_CONTENTS
- Specifies the source string to use when
reconciling.
At least one of SOURCE_AST
or SOURCE_CONTENTS
must have a non-null value in the given context.
The given context may provide additional data that this method can use, including the following:
ISourceFileImplSupport.SOURCE_SNAPSHOT
- Specifies the source snapshot from which
SOURCE_AST
was created or SOURCE_CONTENTS
was obtained. The snapshot may expire.
Subclasses may override this method, but must make sure to call the super implementation.
This implementation calls reconcileStructure
if, and only if, shouldReconcileStructure
returns true
.
If shouldReconcileStructure
returns true
,
this implementation invokes reconcileStructure
, builds
the resulting delta using an element change recorder
, and sends out a POST_RECONCILE
event
using the notification manager registered in the model context.
reconcile
in class ISourceFileImplSupport.ReconcileOperation
context
- the operation context (not null
)monitor
- a progress monitor, or null
if progress reporting is not desired. The caller must not rely on
IProgressMonitor.done()
having been called by the receiverorg.eclipse.core.runtime.CoreException
- if the working copy could not be reconciledprotected ElementChangeRecorder newChangeRecorder()
null
)