public class SourceSynchronizationService extends org.eclipse.gmf.runtime.common.core.service.Service implements ISourceSynchronizationProvider
ISourceSynchronizationProvider
implementations in emitting updates to PSM model elements based on changes to the Semantic
model.
This service emits the provided ModelChangeDelta using the ExecutionStrategy.FORWARD
strategy. That is, all registered CodeProviders will be invoked in order of priority to
generate an ICommand representing their contribution to the overall operation.ISourceSynchronizationProvider,
ModelChangeDeltaINVALID_ELEMENT_MESSAGE_PATTERNEXT_POINT_TAG, HANDLER_ID_TAG, ID_ATTRIBUTE_TAG| Modifier and Type | Method and Description |
|---|---|
org.eclipse.gmf.runtime.common.core.command.ICommand |
emit(ModelChangeDelta delta)
Generates an
ICommand based on the provided
ModelChangeDelta that, when executed, will complete all
operations necessary to alter the corresponding domain element managed by
this provider implementation. |
static SourceSynchronizationService |
getInstance()
Retrieves the singleton instance of this service.
|
protected org.eclipse.gmf.runtime.common.core.service.Service.ProviderDescriptor |
newProviderDescriptor(org.eclipse.core.runtime.IConfigurationElement element) |
addProvider, clearCache, configureProviders, configureProviders, createPriorityCache, execute, executeUnique, getAllProviders, getCachingKey, getPriority, getProviders, isOptimistic, isOptimized, providerChanged, provides, provides, removeProvideraddProviderChangeListener, fireProviderChange, removeProviderChangeListenerpublic static SourceSynchronizationService getInstance()
public org.eclipse.gmf.runtime.common.core.command.ICommand emit(ModelChangeDelta delta)
ISourceSynchronizationProvider
Generates an ICommand based on the provided
ModelChangeDelta that, when executed, will complete all
operations necessary to alter the corresponding domain element managed by
this provider implementation. The returned ICommand must
not attempt to make changes to the Semantic or Notational models
directly. The command must also expect to be appended to an encapsulating
Compound command that may contain other ICommands
contributed by other providers registered against the
CodeProviders extension point.
IMPORTANT: If the affected domain element is under source control, the generated ICommand's execute() method must ensure the file is writable (e.g. by performing a checkout if necessary) before modifying the domain element.
emit in interface ISourceSynchronizationProviderdelta - the ModelChangeDelta to be handled.ISourceSynchronizationProvider.emit(com.ibm.xtools.mmi.core.delta.ModelChangeDelta)protected org.eclipse.gmf.runtime.common.core.service.Service.ProviderDescriptor newProviderDescriptor(org.eclipse.core.runtime.IConfigurationElement element)
newProviderDescriptor in class org.eclipse.gmf.runtime.common.core.service.Service