public abstract class AbstractSourceSynchronizationProvider extends org.eclipse.gmf.runtime.common.core.service.AbstractProvider implements ISourceSynchronizationProvider
EXT_POINT_TAG, HANDLER_ID_TAG, ID_ATTRIBUTE_TAG
Constructor and Description |
---|
AbstractSourceSynchronizationProvider()
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract org.eclipse.gmf.runtime.common.core.command.ICommand |
doEmit(ModelChangeDelta delta) |
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. |
abstract boolean |
isEditable(ModelChangeDelta delta)
Returns false if the change involves an element that cannot be edited,
e.g.
|
protected abstract boolean |
matchesEmitCriteria(ModelChangeDelta delta) |
boolean |
provides(org.eclipse.gmf.runtime.common.core.service.IOperation operation) |
protected boolean |
supports(ModelChangeDelta delta) |
addProviderChangeListener, fireProviderChange, removeProviderChangeListener
public AbstractSourceSynchronizationProvider()
public abstract boolean isEditable(ModelChangeDelta delta)
delta
- ModelChangeDelta that may or may not involve an element
that cannot be edited.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 ISourceSynchronizationProvider
delta
- the ModelChangeDelta to be handled.protected abstract org.eclipse.gmf.runtime.common.core.command.ICommand doEmit(ModelChangeDelta delta) throws java.lang.Exception
java.lang.Exception
public boolean provides(org.eclipse.gmf.runtime.common.core.service.IOperation operation)
provides
in interface org.eclipse.gmf.runtime.common.core.service.IProvider
IProvider.provides(org.eclipse.gmf.runtime.common.core.service.IOperation)
protected boolean supports(ModelChangeDelta delta)
protected abstract boolean matchesEmitCriteria(ModelChangeDelta delta)