Class ExpectedValueControlRenderer

    • Method Detail

      • finalizeRendering

        public void finalizeRendering​(org.eclipse.swt.widgets.Composite parent)
        Description copied from class: AbstractSWTRenderer
        Called by the framework to initialize listener.
        Overrides:
        finalizeRendering in class AbstractSWTRenderer<VControl>
        Parameters:
        parent - the parent used during render
      • createBindings

        protected org.eclipse.core.databinding.Binding[] createBindings​(org.eclipse.swt.widgets.Control control)
                                                                 throws DatabindingFailedException
        Create the Bindings for this controls.
        Specified by:
        createBindings in class SimpleControlSWTControlSWTRenderer
        Parameters:
        control - the Control to create the binding for
        Returns:
        all the bindings created by this renderer
        Throws:
        DatabindingFailedException - if the creation of the bindings fails.
        See Also:
        org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTControlSWTRenderer#createBindings(org.eclipse.swt.widgets.Control, org.eclipse.emf.ecore.EStructuralFeature.Setting)
      • createTooltipBinding

        protected org.eclipse.core.databinding.Binding createTooltipBinding​(org.eclipse.swt.widgets.Control text,
                                                                            org.eclipse.core.databinding.observable.value.IObservableValue modelValue,
                                                                            org.eclipse.core.databinding.DataBindingContext dataBindingContext,
                                                                            org.eclipse.core.databinding.UpdateValueStrategy targetToModel,
                                                                            org.eclipse.core.databinding.UpdateValueStrategy modelToTarget)
        Creates a tooltip binding for this control.
        Parameters:
        text - the Text to bind
        modelValue - the IObservableValue to bind
        dataBindingContext - the DataBindingContext to use
        targetToModel - the UpdateValueStrategy from target to Model
        modelToTarget - the UpdateValueStrategy from model to target
        Returns:
        the created Binding
      • getSelectedObject

        protected java.lang.Object getSelectedObject​(org.eclipse.emf.ecore.EAttribute attribute)
        Lets the user select an object and returns the selection.
        Parameters:
        attribute - the attribute for which an object is needed
        Returns:
        the object
      • showError

        protected void showError​(org.eclipse.swt.widgets.Shell shell,
                                 java.lang.String title,
                                 java.lang.String description)
        Shows an error message to the user.
        Parameters:
        shell - The Shell to show the error on
        title - The title of the error message
        description - The error description
      • onSelectButton

        protected abstract void onSelectButton​(org.eclipse.swt.widgets.Label text)
        Called when the select value button is pressed.
        Parameters:
        text - the label which should be used to set the value
      • getObservedEObject

        protected org.eclipse.emf.ecore.EObject getObservedEObject()
                                                            throws DatabindingFailedException
        Returns the model object representing the value for this renderer's domain model reference.
        Returns:
        the EObject
        Throws:
        DatabindingFailedException - if the databinding fails