Interface IViewProvider
-
- All Known Subinterfaces:
IFilteredViewProvider
- All Known Implementing Classes:
ExtensionXMIViewModelProvider
,PreviewWorkspaceViewProvider
,ViewProvider
,XMIViewModelProvider
public interface IViewProvider
This interface defines a generic way to provide aVView
. First the can render method is called. The provider with the highest priority is then asked toprovideViewModel(EObject, VViewModelProperties)
aVView
.- Since:
- 1.2
- Author:
- Eugen Neufeld
-
-
Field Summary
Fields Modifier and Type Field Description static double
NOT_APPLICABLE
Constant indicating, that the provider cannot provide aVView
for a specificEObject
.
-
Method Summary
All Methods Instance Methods Abstract 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 ifcanProvideViewModel(EObject, VViewModelProperties)
returned the highest positive number of allIViewProviders
.
-
-
-
Field Detail
-
NOT_APPLICABLE
static final double NOT_APPLICABLE
Constant indicating, that the provider cannot provide aVView
for a specificEObject
.- See Also:
- Constant Field Values
-
-
Method Detail
-
canProvideViewModel
double canProvideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
Called to check whether the provider can provide aVView
for anEObject
.- 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
orNOT_APPLICABLE
if it doesn't fit - Since:
- 1.7
-
provideViewModel
VView provideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
This method is only called ifcanProvideViewModel(EObject, VViewModelProperties)
returned the highest positive number of allIViewProviders
. It must then return aVView
to theEObject
.- Parameters:
eObject
- theEObject
to generate theVView
forproperties
- theproperties
for providing the view- Returns:
- the generated
VView
- Since:
- 1.7
-
-