Class ViewProvider
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.generator.ViewProvider
-
- All Implemented Interfaces:
IViewProvider
public class ViewProvider extends java.lang.Object implements IViewProvider
View Provider.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emf.ecp.view.spi.provider.IViewProvider
NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description ViewProvider()
Initializes me.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
canProvideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
Called to check whether the provider can provide aVView
for anEObject
.VView
provideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
This method is only called ifIViewProvider.canProvideViewModel(EObject, VViewModelProperties)
returned the highest positive number of allIViewProviders
.
-
-
-
Method Detail
-
provideViewModel
public VView provideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
Description copied from interface:IViewProvider
This method is only called ifIViewProvider.canProvideViewModel(EObject, VViewModelProperties)
returned the highest positive number of allIViewProviders
. It must then return aVView
to theEObject
.- Specified by:
provideViewModel
in interfaceIViewProvider
- Parameters:
eObject
- theEObject
to generate theVView
forproperties
- theproperties
for providing the view- Returns:
- the generated
VView
-
canProvideViewModel
public double canProvideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
Description copied from interface:IViewProvider
Called to check whether the provider can provide aVView
for anEObject
.- Specified by:
canProvideViewModel
in interfaceIViewProvider
- Parameters:
eObject
- theEObject
to create aproperties
- theproperties
for providing the view- Returns:
- a positive double indicating how well this provider is fitted to provide a
VView
for the providedEObject
orIViewProvider.NOT_APPLICABLE
if it doesn't fit
-
-