Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, Map)` 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, Map<String,Object> context)` Called to check whether the provider can provide a `VView` for an `EObject`.
`VView` | `generate(org.eclipse.emf.ecore.EObject eObject, Map<String,Object> context)` This method is only called if `canRender(EObject, Map)` 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,
                  Map<String,Object> context)

  Called to check whether the provider can provide a `VView` for an `EObject`.

  Parameters:
    `eObject` - the `EObject` to create a
    `context` - a key-value-map from String to Object
  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,
                   Map<String,Object> context)

  This method is only called if `canRender(EObject, Map)` 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
    `context` - a key-value-map from String to Object
  Returns:
    the generated `VView`

Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2015. All Rights Reserved.