|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.emf.emfstore.internal.client.model.impl.OperationRecorder
public class OperationRecorder
Tracks changes on any given IdEObjectCollection.
| Field Summary | |
|---|---|
static String |
UNKOWN_CREATOR
Name of unknown creator. |
| Constructor Summary | |
|---|---|
OperationRecorder(ProjectSpaceBase projectSpace)
Constructor. |
|
| Method Summary | |
|---|---|
void |
abortCompositeOperation()
Aborts the current composite operation. |
void |
addOperationRecorderListener(OperationRecorderListener observer)
Adds an operation recorder observer. |
CompositeOperationHandle |
beginCompositeOperation()
Begins a composite operation. |
List<AbstractOperation> |
clearOperations()
Clears the operations list. |
void |
collectionDeleted(IdEObjectCollection collection)
If the IdEObjectCollection is deleted. |
void |
commandCompleted(org.eclipse.emf.common.command.Command command)
Called to notify listener about the successful completion of the given command. |
void |
commandCompleted(org.eclipse.emf.common.command.Command command,
boolean isNestedCommand)
Called to notify listener about the successful completion of the given command. |
void |
commandFailed(org.eclipse.emf.common.command.Command command,
Exception exception)
Called to notify listener about the failure of the given command. |
void |
commandStarted(org.eclipse.emf.common.command.Command command)
Called to notify listener about the start of the given command. |
void |
commitCompleted(ESLocalProject project,
ESPrimaryVersionSpec newRevision,
org.eclipse.core.runtime.IProgressMonitor monitor)
Called after the commit is completed. |
void |
endCompositeOperation()
Complete the current composite operation. |
void |
endCompositeOperation(SemanticCompositeOperation semanticCompositeOperation)
Replace and complete the current composite operation. |
IdEObjectCollection |
getCollection()
Returns the collection the operation recorder is operation on. |
CompositeOperation |
getCompositeOperation()
Returns the composite operation. |
OperationRecorderConfig |
getConfig()
Returns the configuration options for the operation recorder. |
NotificationRecorder |
getNotificationRecorder()
Returns the notification recorder of the project space. |
ProjectSpace |
getProjectSpace()
Returns the project space this operation recorder is attached to. |
boolean |
inspectChanges(ESLocalProject project,
ESChangePackage changePackage,
org.eclipse.core.runtime.IProgressMonitor monitor)
Called before the commit proceeds. |
boolean |
inspectChanges(ESLocalProject project,
List<ESChangePackage> changePackages,
org.eclipse.core.runtime.IProgressMonitor monitor)
Called to notify the observer about the changes that will be merged into the project space. |
boolean |
isCommandRunning()
Whether the operation recorder considers a command is being run. |
void |
modelElementAdded(IdEObjectCollection project,
org.eclipse.emf.ecore.EObject modelElement)
Called when the eObject has been added to the collection. |
void |
modelElementRemoved(IdEObjectCollection project,
org.eclipse.emf.ecore.EObject modelElement)
Called when the eObject and its siblings have been removed from
the collection. |
void |
notify(org.eclipse.emf.common.notify.Notification notification,
IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject modelElement)
A notification on a model element of the collection occurred. |
void |
removeOperationRecorderListener(OperationRecorderListener observer)
Removes an operation recorder observer. |
void |
shareDone(ESLocalProject localProject)
Called when the share of the passed ESLocalProject completed successfully. |
void |
startChangeRecording()
Starts change recording on this workspace, resumes previous recordings if there are any. |
void |
stopChangeRecording()
Stops current recording of changes and adds recorded changes to this project spaces changes. |
void |
updateCompleted(ESLocalProject project,
org.eclipse.core.runtime.IProgressMonitor monitor)
Called after the changes have been applied to the project and the update is completed. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String UNKOWN_CREATOR
| Constructor Detail |
|---|
public OperationRecorder(ProjectSpaceBase projectSpace)
projectSpace - the ProjectSpaceBase the recorder should be attached to| Method Detail |
|---|
public List<AbstractOperation> clearOperations()
public OperationRecorderConfig getConfig()
public IdEObjectCollection getCollection()
public void modelElementAdded(IdEObjectCollection project,
org.eclipse.emf.ecore.EObject modelElement)
eObject has been added to the collection.
modelElementAdded in interface IdEObjectCollectionChangeObserverproject - the IdEObjectCollection to which the eObject was addedmodelElement - the EObject that has been added to the collectionIdEObjectCollectionChangeObserver.modelElementAdded(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection,
org.eclipse.emf.ecore.EObject)public void addOperationRecorderListener(OperationRecorderListener observer)
observer - the observer to be addedpublic void removeOperationRecorderListener(OperationRecorderListener observer)
observer - the observer to be removedpublic void startChangeRecording()
public void stopChangeRecording()
public NotificationRecorder getNotificationRecorder()
public void modelElementRemoved(IdEObjectCollection project,
org.eclipse.emf.ecore.EObject modelElement)
eObject and its siblings have been removed from
the collection.
NOTE: Note that you will NOT receive a separate notification for each
sibling.
modelElementRemoved in interface IdEObjectCollectionChangeObserverproject - the IdEObjectCollection to which the eObject was addedmodelElement - the EObject that has been added to the collectionIdEObjectCollectionChangeObserver.modelElementRemoved(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection,
org.eclipse.emf.ecore.EObject)public void commandCompleted(org.eclipse.emf.common.command.Command command)
commandCompleted in interface ESCommandObservercommand - the commandESCommandObserver.commandCompleted(org.eclipse.emf.common.command.Command)
public void commandCompleted(org.eclipse.emf.common.command.Command command,
boolean isNestedCommand)
command - the completed commandisNestedCommand - whether the completed command is a command inside another one
public void commandFailed(org.eclipse.emf.common.command.Command command,
Exception exception)
commandFailed in interface ESCommandObservercommand - the commandexception - the exception that occurredESCommandObserver.commandFailed(org.eclipse.emf.common.command.Command,
java.lang.Exception)public void commandStarted(org.eclipse.emf.common.command.Command command)
commandStarted in interface ESCommandObservercommand - the commandESCommandObserver.commandStarted(org.eclipse.emf.common.command.Command)public CompositeOperation getCompositeOperation()
public CompositeOperationHandle beginCompositeOperation()
public void endCompositeOperation(SemanticCompositeOperation semanticCompositeOperation)
semanticCompositeOperation - the semantic operation that replaces the composite operationpublic void endCompositeOperation()
public void abortCompositeOperation()
public void notify(org.eclipse.emf.common.notify.Notification notification,
IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject modelElement)
Notification documentation for details on the notifications.
This method will be called even if the given notification results from an add
or remove of a model element of the project.
notify in interface IdEObjectCollectionChangeObservernotification - the notificationcollection - the collection holding the modelElementmodelElement - the model element the notification originates fromIdEObjectCollectionChangeObserver.notify(org.eclipse.emf.common.notify.Notification,
org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection, org.eclipse.emf.ecore.EObject)public void collectionDeleted(IdEObjectCollection collection)
IdEObjectCollection is deleted.
collectionDeleted in interface IdEObjectCollectionChangeObservercollection - the IdEObjectCollection that has been deletedIdEObjectCollectionChangeObserver.collectionDeleted(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection)public ProjectSpace getProjectSpace()
public boolean inspectChanges(ESLocalProject project,
List<ESChangePackage> changePackages,
org.eclipse.core.runtime.IProgressMonitor monitor)
inspectChanges in interface ESUpdateObserverproject - the ESLocalProject that should be updatedchangePackages - a list of ESChangePackages containing the update changesmonitor - an IProgressMonitor instance that may be used by clients to inform
about progress
false if the observer wants to cancel the update, true otherwiseESUpdateObserver.inspectChanges(org.eclipse.emf.emfstore.client.ESLocalProject,
java.util.List, org.eclipse.core.runtime.IProgressMonitor)
public boolean inspectChanges(ESLocalProject project,
ESChangePackage changePackage,
org.eclipse.core.runtime.IProgressMonitor monitor)
inspectChanges in interface ESCommitObserverproject - the project the commit occurs onchangePackage - the ESChangePackagemonitor - an IProgressMonitor instance that may be used by clients to inform
about progress
ESCommitObserver.inspectChanges(org.eclipse.emf.emfstore.client.ESLocalProject,
org.eclipse.emf.emfstore.server.model.ESChangePackage, org.eclipse.core.runtime.IProgressMonitor)
public void updateCompleted(ESLocalProject project,
org.eclipse.core.runtime.IProgressMonitor monitor)
updateCompleted in interface ESUpdateObserverproject - the ESLocalProject whose update has been completedmonitor - an IProgressMonitor instance that may be used by clients to inform
about progressESUpdateObserver.updateCompleted(org.eclipse.emf.emfstore.client.ESLocalProject,
org.eclipse.core.runtime.IProgressMonitor)public void shareDone(ESLocalProject localProject)
ESLocalProject completed successfully.
shareDone in interface ESShareObserverlocalProject - the local project that has been sharedESShareObserver.shareDone(org.eclipse.emf.emfstore.client.ESLocalProject)
public void commitCompleted(ESLocalProject project,
ESPrimaryVersionSpec newRevision,
org.eclipse.core.runtime.IProgressMonitor monitor)
commitCompleted in interface ESCommitObserverproject - the project on which the commit has completednewRevision - the new revision that was created by the commitmonitor - an IProgressMonitor instance that may be used by clients to inform
about progressESCommitObserver.commitCompleted(org.eclipse.emf.emfstore.client.ESLocalProject,
org.eclipse.emf.emfstore.server.model.versionspec.ESPrimaryVersionSpec,
org.eclipse.core.runtime.IProgressMonitor)public boolean isCommandRunning()
true if a command is being run, false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||