Package jetbrains.mps.smodel.event
Class RepositoryChangeTracker
- java.lang.Object
 - 
- org.jetbrains.mps.openapi.module.SModuleListenerBase
 - 
- org.jetbrains.mps.openapi.module.SRepositoryContentAdapter
 - 
- jetbrains.mps.smodel.event.RepositoryChangeTracker
 
 
 
 
- 
- All Implemented Interfaces:
 SModelListener,SNodeAccessListener,SNodeChangeListener,SModuleListener,SRepositoryAttachListener,SRepositoryListener
public class RepositoryChangeTracker extends SRepositoryContentAdapter
XXX PERHAPS, NAME OF THE CLASS SHALL REFLECT WE TRACK CHANGES WITHIN COMMANDS ONLY? IS THERE CASE WHEN WE NEED TO TRACK CHANGES WITHOUT RESPECT TO COMMAND? Tracks changes in a repository within boundaries of a command, and dispatch them further to listeners. Replacement forjetbrains.mps.smodel.GlobalSModelEventsManager, in particular#addGlobalCommandListenerandSModelCommandListenerRepositoryChangeTracker may come from a dedicated project component (to share it unless there's mechanism to accomplish the same through SRepository/MPSProject. Although why not Project.getComponent?) 
- 
- 
Constructor Summary
Constructors Constructor Description RepositoryChangeTracker() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(SNodeBatchChangeListener l)voidcommandFinished(SRepository repository)voidcommandStarted(SRepository repository)Notifications about commands in aModelAccessassociated with the repository.protected booleanisIncluded(SModule module)voidremoveListener(SNodeBatchChangeListener l)protected voidstartListening(SModel model)no-op by default.protected voidstopListening(SModel model)no-op by default- 
Methods inherited from class org.jetbrains.mps.openapi.module.SRepositoryContentAdapter
beforeModelRemoved, beforeModuleRemoved, conflictDetected, modelAdded, modelAttached, modelDetached, modelLoaded, modelRemoved, modelReplaced, modelSaved, modelUnloaded, moduleAdded, moduleChanged, moduleRemoved, nodeAdded, nodeRead, nodeRemoved, problemsDetected, propertyChanged, propertyRead, referenceChanged, referenceRead, repositoryChanged, repositoryCommandFinished, repositoryCommandStarted, startListening, startListening, stopListening, stopListening, subscribeTo, unsubscribeFrom, updateFinished, updateStarted 
- 
Methods inherited from class org.jetbrains.mps.openapi.module.SModuleListenerBase
beforeModelRenamed, dependencyAdded, dependencyRemoved, languageAdded, languageRemoved, modelRenamed, moduleRenamed 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.jetbrains.mps.openapi.module.SModuleListener
beforeModelRenamed, dependencyAdded, dependencyRemoved, languageAdded, languageRemoved, modelRenamed 
 - 
 
 - 
 
- 
- 
Method Detail
- 
isIncluded
protected boolean isIncluded(SModule module)
- Overrides:
 isIncludedin classSRepositoryContentAdapter- Returns:
 - always 
true 
 
- 
startListening
protected void startListening(SModel model)
Description copied from class:SRepositoryContentAdapterno-op by default. Subclasses that wish to get model/node change/access events, shall add appropriate listeners here. These listeners are implemented by this class only for convenience, events are not dispatched unless proper listener is explicitly attached.- Overrides:
 startListeningin classSRepositoryContentAdapter
 
- 
stopListening
protected void stopListening(SModel model)
Description copied from class:SRepositoryContentAdapterno-op by default- Overrides:
 stopListeningin classSRepositoryContentAdapter
 
- 
commandStarted
public void commandStarted(SRepository repository)
Description copied from interface:SRepositoryListenerNotifications about commands in aModelAccessassociated with the repository. It's convenient to have command notifications right in SRepositoryListener implementation, like RepositoryChangeTracker (the one where all changes within a command are collected), rather than have distinctCommandListener. UnlikeCommandListener, gives context repository to facilitate use of the same listener instance among different repositories.- Specified by:
 commandStartedin interfaceSRepositoryListener- Overrides:
 commandStartedin classSRepositoryContentAdapter- See Also:
 CommandListener.commandStarted()
 
- 
commandFinished
public void commandFinished(SRepository repository)
- Specified by:
 commandFinishedin interfaceSRepositoryListener- Overrides:
 commandFinishedin classSRepositoryContentAdapter- See Also:
 CommandListener.commandFinished()
 
- 
addListener
public void addListener(@Nullable SNodeBatchChangeListener l)
 
- 
removeListener
public void removeListener(@Nullable SNodeBatchChangeListener l)
 
 - 
 
 -