Class ViewModelFileExtensionsManager


  • public final class ViewModelFileExtensionsManager
    extends java.lang.Object
    Manages the view models provided by the file extension point.
    Author:
    Jonas Helming
    • Method Detail

      • setUUIDAsElementId

        public static void setUUIDAsElementId​(VViewResourceImpl resource,
                                              VView view)
        Sets the UUID mapping from the given resource as the element id of all elements in the given view model.
        Parameters:
        resource - the VViewResourceImpl-
        view - the view
      • loadResource

        public static VViewResourceImpl loadResource​(org.eclipse.emf.common.util.URI uri)
        Loads a resource containing a view model.
        Parameters:
        uri - a URI containing the path to the file
        Returns:
        the loaded resource
      • dispose

        public static void dispose()
        Disposed the instance.
      • getExtensionURIS

        public static java.util.Map<org.eclipse.emf.common.util.URI,​java.util.List<org.eclipse.emf.ecp.view.model.provider.xmi.ViewModelFileExtensionsManager.ExtensionDescription>> getExtensionURIS()
        Returns:
        a list of uris of all xmi files registered
      • hasViewModelFor

        public boolean hasViewModelFor​(org.eclipse.emf.ecore.EObject eObject,
                                       VViewModelProperties properties,
                                       java.util.Collection<java.lang.String> requiredKeys)
        Parameters:
        eObject - the object to be rendered
        properties - the properties
        requiredKeys - the filter keys that are required to match
        Returns:
        if there is a xmi file registered containing a view model for the given type
      • createView

        public VView createView​(org.eclipse.emf.ecore.EObject eObject,
                                VViewModelProperties properties,
                                java.util.Collection<java.lang.String> requiredKeys)
        Parameters:
        eObject - The EObject to create a view for
        properties - the properties
        requiredKeys - the filter keys that are required to match
        Returns:
        a view model for the given eObject