Class ViewProviderHelper
- java.lang.Object
-
- org.eclipse.emf.ecp.view.spi.provider.ViewProviderHelper
-
public final class ViewProviderHelper extends java.lang.Object
Util class for retrieving aVView
based on anEObject
.- Since:
- 1.2
- Author:
- Eugen Neufeld
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static VView
getView(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
This allows to retrieve aVView
based on anEObject
.static VView
getView(org.eclipse.emf.ecore.EObject object, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
-
-
-
Method Detail
-
getView
public static VView getView(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
This allows to retrieve aVView
based on anEObject
. This method reads allIViewProviders
and searches for the best fitting. If none can be found, then null is returned.- Parameters:
eObject
- theEObject
to find aVView
forproperties
- theproperties
. May benull
- Returns:
- a view model for the given
EObject
or null if no suited provider could be found - Since:
- 1.7
-
getView
public static VView getView(org.eclipse.emf.ecore.EObject object, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
- Parameters:
object
- the domain model object for which a view is to be requestedproperties
- theproperties
for providing the view, that may or may not include matching filtersrequiredKeys
- a subset (possibly empty) of the keys in theproperties
that must be matched by any view model that I would provide. If any of these keys does not match a view model, then that view model must not be provided. Otherwise, it may just be less preferred than some other view model that does match- Returns:
- a view model for the given domain model
object
ornull
if no suitable provider could be found to provide one - Since:
- 1.22
-
-