Class ExtensionXMIViewModelProvider

    • Constructor Detail

      • ExtensionXMIViewModelProvider

        public ExtensionXMIViewModelProvider()
    • 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 model object where some keys in the properties are required to be matched in an implementation-specific way by the view models the I have access to.
        Specified by:
        canProvideViewModel in interface IFilteredViewProvider
        Parameters:
        eObject - the domain model object for which a view is to be requested
        properties - the properties for providing the view, that may or may not include matching filters
        requiredKeys - a subset (possibly empty) of the keys in the properties 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 given object, or IViewProvider.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 model object. This method is only called if a previous invocation of IFilteredViewProvider.canProvideViewModel(EObject, VViewModelProperties, Collection) with the same arguments returned the highest positive result amongst all available providers.
        Specified by:
        provideViewModel in interface IFilteredViewProvider
        Parameters:
        eObject - the domain model object for which a view is to be requested
        properties - the properties for providing the view, that may or may not include matching filters
        requiredKeys - a subset (possibly empty) of the keys in the properties 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