org.eclipse.emf.ecp.view.spi.context
Interface ViewModelContext

All Known Subinterfaces:
DiffMergeModelContext
All Known Implementing Classes:
DiffMergeModelContextImpl, ViewModelContextImpl

public interface ViewModelContext

The Interface ViewModelContext.

Since:
1.2
Author:
Eugen Neufeld

Method Summary
 void dispose()
          Disposes the context.
 Set<VControl> getControlsFor(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
          Returns all controls which are associated with the provided EStructuralFeature.Setting.
 Set<VControl> getControlsFor(UniqueSetting setting)
          Returns all controls which are associated with the provided UniqueSetting.
 org.eclipse.emf.ecore.EObject getDomainModel()
          Gets the domain model.
<T> T
getService(Class<T> serviceType)
          Retrieve an ViewModelService of type serviceType.
 VElement getViewModel()
          Gets the view model.
<T> boolean
hasService(Class<T> serviceType)
          Whether the context has a service of the given type serviceType.
 void registerDomainChangeListener(ModelChangeListener modelChangeListener)
          Register domain change listener.
 void registerViewChangeListener(ModelChangeListener modelChangeListener)
          Register view change listener.
 void unregisterDomainChangeListener(ModelChangeListener modelChangeListener)
          Unregister domain change listener.
 void unregisterViewChangeListener(ModelChangeListener modelChangeListener)
          Unregister view change listener.
 

Method Detail

registerDomainChangeListener

void registerDomainChangeListener(ModelChangeListener modelChangeListener)
Register domain change listener.

Parameters:
modelChangeListener - the model change listener
Since:
1.3

unregisterDomainChangeListener

void unregisterDomainChangeListener(ModelChangeListener modelChangeListener)
Unregister domain change listener.

Parameters:
modelChangeListener - the model change listener
Since:
1.3

getViewModel

VElement getViewModel()
Gets the view model.

Returns:
the view model

getDomainModel

org.eclipse.emf.ecore.EObject getDomainModel()
Gets the domain model.

Returns:
the domain model

registerViewChangeListener

void registerViewChangeListener(ModelChangeListener modelChangeListener)
Register view change listener.

Parameters:
modelChangeListener - the model change listener
Since:
1.3

unregisterViewChangeListener

void unregisterViewChangeListener(ModelChangeListener modelChangeListener)
Unregister view change listener.

Parameters:
modelChangeListener - the model change listener
Since:
1.3

dispose

void dispose()
Disposes the context.


hasService

<T> boolean hasService(Class<T> serviceType)
Whether the context has a service of the given type serviceType.

Type Parameters:
T - the type of the desired service
Parameters:
serviceType - the type of the service
Returns:
true, if the context has a service of the given type, false otherwise

getService

<T> T getService(Class<T> serviceType)
Retrieve an ViewModelService of type serviceType.

Type Parameters:
T - the type of the desired service
Parameters:
serviceType - the type of the service to be retrieved
Returns:
the service

getControlsFor

Set<VControl> getControlsFor(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
Returns all controls which are associated with the provided EStructuralFeature.Setting. The EStructuralFeature.Setting is converted to a UniqueSetting.

Parameters:
setting - the EStructuralFeature.Setting to search controls for
Returns:
the Set of all controls associated with the provided setting or null if no controls can be found
Since:
1.3

getControlsFor

Set<VControl> getControlsFor(UniqueSetting setting)
Returns all controls which are associated with the provided UniqueSetting.

Parameters:
setting - the UniqueSetting to search controls for
Returns:
the Set of all controls associated with the provided setting or null if no controls can be found
Since:
1.3


Copyright © 2014. All Rights Reserved.