Class ViewModelFileExtensionsManager
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.provider.xmi.ViewModelFileExtensionsManager
-
public final class ViewModelFileExtensionsManager extends java.lang.Object
Manages the view models provided by the file extension point.- Author:
- Jonas Helming
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VView
createView(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
static void
dispose()
Disposed the instance.static java.util.Map<org.eclipse.emf.common.util.URI,java.util.List<org.eclipse.emf.ecp.view.model.provider.xmi.ViewModelFileExtensionsManager.ExtensionDescription>>
getExtensionURIS()
static ViewModelFileExtensionsManager
getInstance()
boolean
hasViewModelFor(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
static VViewResourceImpl
loadResource(org.eclipse.emf.common.util.URI uri)
Loads a resource containing a view model.static void
setUUIDAsElementId(VViewResourceImpl resource, VView view)
Sets the UUID mapping from the given resource as theelement id
of all elements in the given view model.
-
-
-
Method Detail
-
getInstance
public static ViewModelFileExtensionsManager getInstance()
- Returns:
- the iNSTANCE
-
setUUIDAsElementId
public static void setUUIDAsElementId(VViewResourceImpl resource, VView view)
Sets the UUID mapping from the given resource as theelement id
of all elements in the given view model.- Parameters:
resource
- theVViewResourceImpl
-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 renderedproperties
- theproperties
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
- TheEObject
to create a view forproperties
- theproperties
requiredKeys
- the filter keys that are required to match- Returns:
- a view model for the given eObject
-
-