Class ViewTemplateSupplierImpl
- java.lang.Object
-
- org.eclipse.emf.ecp.view.template.service.ViewTemplateSupplierImpl
-
- All Implemented Interfaces:
ViewTemplateSupplier
public class ViewTemplateSupplierImpl extends java.lang.Object implements ViewTemplateSupplier
EMF Forms's defaultViewTemplateSupplier
collectingVTViewTemplates
registered to the extension point "org.eclipse.emf.ecp.view.template
".- Author:
- Lucas Koehler
-
-
Constructor Summary
Constructors Constructor Description ViewTemplateSupplierImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
generateSegments(VTViewTemplate template)
Generate segments for all DMRs of domain model reference selectors and set the corresponding EClasses to the selectors.java.util.Map<VTStyleProperty,java.lang.Double>
getStyleProperties(VElement vElement, ViewModelContext viewModelContext)
Return allStyleProperties
which are applicable to the providedVElement
.java.util.Set<VTViewTemplate>
getViewTemplates()
Returns a copy of the view templates known to this supplier.protected void
startup(org.osgi.framework.BundleContext bundleContext)
Startup method for osgi service.
-
-
-
Method Detail
-
startup
protected void startup(org.osgi.framework.BundleContext bundleContext)
Startup method for osgi service.- Parameters:
bundleContext
- theBundleContext
-
generateSegments
protected void generateSegments(VTViewTemplate template)
Generate segments for all DMRs of domain model reference selectors and set the corresponding EClasses to the selectors.- Parameters:
template
- The view template containing the DMR selectors
-
getViewTemplates
public java.util.Set<VTViewTemplate> getViewTemplates()
Description copied from interface:ViewTemplateSupplier
Returns a copy of the view templates known to this supplier. Modifications on the copies will not influence any future calls on theViewTemplateSupplier
- Specified by:
getViewTemplates
in interfaceViewTemplateSupplier
- Returns:
- a copy of the
VTViewTemplates
or an empty set
-
getStyleProperties
public java.util.Map<VTStyleProperty,java.lang.Double> getStyleProperties(VElement vElement, ViewModelContext viewModelContext)
Description copied from interface:ViewTemplateSupplier
Return allStyleProperties
which are applicable to the providedVElement
. The keys of the map are theStyleProperties
and the values the corresponding specificities.The returned values might be cached by the caller. Therefore, for the same arguments, the
ViewTemplateSupplier
is expected to return the same map ofStyleProperties
and specificities.- Specified by:
getStyleProperties
in interfaceViewTemplateSupplier
- Parameters:
vElement
- theVElement
to get theStyleProperties
forviewModelContext
- theViewModelContext
currently in use- Returns:
- the map of all
StyleProperties
and their specificities for the givenVElement
or an empty map
-
-