org.eclipse.emf.ecp.view.spi.provider
Interface IViewProvider

All Known Implementing Classes:
ExtensionXMIViewModelProvider, ViewProvider, XMIViewModelProvider

public interface IViewProvider

This interface defines a generic way to provide a VView. First the can render method is called. The provider with the highest priority is then asked to generate(EObject) a VView.

Since:
1.2
Author:
Eugen Neufeld

Field Summary
static int NOT_APPLICABLE
          Constant indicating, that the provider cannot provide a VView for a specific EObject.
 
Method Summary
 int canRender(org.eclipse.emf.ecore.EObject eObject)
          Called to check whether the provider can provide a VView for an EObject.
 VView generate(org.eclipse.emf.ecore.EObject eObject)
          This method is only called if canRender(EObject) returned the highest positive number of all IViewProviders.
 

Field Detail

NOT_APPLICABLE

static final int NOT_APPLICABLE
Constant indicating, that the provider cannot provide a VView for a specific EObject.

See Also:
Constant Field Values
Method Detail

canRender

int canRender(org.eclipse.emf.ecore.EObject eObject)
Called to check whether the provider can provide a VView for an EObject.

Parameters:
eObject - the EObject to create a
Returns:
an integer indicating how well this provider is fitted to provide a VView for the provided EObject or NOT_APPLICABLE if it doesn't fit

generate

VView generate(org.eclipse.emf.ecore.EObject eObject)
This method is only called if canRender(EObject) returned the highest positive number of all IViewProviders. It must then return a VView to the EObject.

Parameters:
eObject - the EObject to generate the VView for
Returns:
the generated VView


Copyright © 2014. All Rights Reserved.