Class ExtensionXMIViewModelProvider
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.provider.xmi.ExtensionXMIViewModelProvider
-
- All Implemented Interfaces:
IFilteredViewProvider
,IViewProvider
public class ExtensionXMIViewModelProvider extends java.lang.Object implements IFilteredViewProvider
AnIViewProvider
which loads view models from extension points.- Author:
- Jonas Helming
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emf.ecp.view.spi.provider.IViewProvider
NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description ExtensionXMIViewModelProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
canProvideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
Queries the confidence with which I can provide a view model for the given domain modelobject
where some keys in theproperties
are required to be matched in an implementation-specific way by the view models the I have access to.VView
provideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
Obtains the view model that I can provide for the given domain modelobject
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.emf.ecp.view.spi.provider.IFilteredViewProvider
canProvideViewModel, provideViewModel
-
-
-
-
Method Detail
-
canProvideViewModel
public double canProvideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
Description copied from interface:IFilteredViewProvider
Queries the confidence with which I can provide a view model for the given domain modelobject
where some keys in theproperties
are required to be matched in an implementation-specific way by the view models the I have access to.- Specified by:
canProvideViewModel
in interfaceIFilteredViewProvider
- Parameters:
eObject
- 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 positive double indicating how well I am suited to
provide a
VView
for the givenobject
, orIViewProvider.NOT_APPLICABLE
if I cannot provide a view model
-
provideViewModel
public VView provideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
Description copied from interface:IFilteredViewProvider
Obtains the view model that I can provide for the given domain modelobject
. This method is only called if a previous invocation ofIFilteredViewProvider.canProvideViewModel(EObject, VViewModelProperties, Collection)
with the same arguments returned the highest positive result amongst all available providers.- Specified by:
provideViewModel
in interfaceIFilteredViewProvider
- Parameters:
eObject
- 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:
- the view model
-
-