Interface SWTValidationUiService

  • All Known Implementing Classes:
    SWTValidationUiServiceImpl

    public interface SWTValidationUiService
    Service implementations provide visualizations (icons and colors) for validation results.
    Since:
    1.23
    Author:
    Lucas Koehler
    • Method Detail

      • getValidationIcon

        org.eclipse.swt.graphics.Image getValidationIcon​(org.eclipse.emf.common.util.Diagnostic diagnostic,
                                                         VElement vElement,
                                                         ViewModelContext viewModelContext)
        Returns the validation icon matching the given Diagnostic, VElement and view model context, if applicable.
        Parameters:
        diagnostic - the Diagnostic defining the validation visualization
        vElement - The VElement that is being rendered
        viewModelContext - The corresponding ViewModelContext
        Returns:
        the icon to be displayed, or null when no icon is to be displayed
      • getValidationIcon

        org.eclipse.swt.graphics.Image getValidationIcon​(VElement vElement,
                                                         ViewModelContext viewModelContext)
        Returns the validation icon matching the highest severity of the given VElement's diagnostic.
        Parameters:
        vElement - The VElement that is being rendered
        viewModelContext - The corresponding ViewModelContext
        Returns:
        the icon to be displayed, or null when no icon is to be displayed
      • getValidationForegroundColor

        org.eclipse.swt.graphics.Color getValidationForegroundColor​(org.eclipse.emf.common.util.Diagnostic diagnostic,
                                                                    VElement vElement,
                                                                    ViewModelContext viewModelContext)
        Returns the foreground color for a control with the given Diagnostic, VElement and view model context, if applicable.
        Parameters:
        diagnostic - the Diagnostic defining the validation visualization
        vElement - The VElement that is being rendered
        viewModelContext - The corresponding ViewModelContext
        Returns:
        the color to be used as a foreground color
      • getValidationForegroundColor

        org.eclipse.swt.graphics.Color getValidationForegroundColor​(VElement vElement,
                                                                    ViewModelContext viewModelContext)
        Returns the foreground color for a control matching the highest severity of the given VElement's diagnostic.
        Parameters:
        vElement - The VElement that is being rendered
        viewModelContext - The corresponding ViewModelContext
        Returns:
        the color to be used as a foreground color
      • getValidationBackgroundColor

        org.eclipse.swt.graphics.Color getValidationBackgroundColor​(org.eclipse.emf.common.util.Diagnostic diagnostic,
                                                                    VElement vElement,
                                                                    ViewModelContext viewModelContext)
        Returns the background color for a control with the given Diagnostic, VElement and view model context, if applicable.
        Parameters:
        diagnostic - the Diagnostic defining the validation visualization
        vElement - The VElement that is being rendered
        viewModelContext - The corresponding ViewModelContext
        Returns:
        the color to be used as a background color
      • getValidationBackgroundColor

        org.eclipse.swt.graphics.Color getValidationBackgroundColor​(VElement vElement,
                                                                    ViewModelContext viewModelContext)
        Returns the background color for a control matching the highest severity of the given VElement's diagnostic.
        Parameters:
        vElement - The VElement that is being rendered
        viewModelContext - The corresponding ViewModelContext
        Returns:
        the color to be used as a background color