Class DIRendererUtil


  • public final class DIRendererUtil
    extends java.lang.Object
    Utility methods for implementing depdendency injection renderers.
    Author:
    jfaltermeier
    • Method Detail

      • getContextForElement

        public static org.eclipse.e4.core.contexts.IEclipseContext getContextForElement​(VElement element,
                                                                                        ViewModelContext context)
        Returns the IEclipseContext for the given VElement. If there is no context yet, one will be created.
        Parameters:
        element - the element
        context - the ViewModelContext
        Returns:
        the eclipse context
      • render

        public static java.lang.Object render​(java.lang.Object pojo,
                                              VElement element,
                                              ViewModelContext context)
        Renders the given pojo.
        Parameters:
        pojo - the renderer pojo
        element - the VElement to render
        context - the ViewModelContext
        Returns:
        the rendering result (Control/Composite)