Class ProblemsDecorationHelper


  • public final class ProblemsDecorationHelper
    extends Object
    This ui helper for MarkerSeverity decoration by label providers.
    • Method Detail

      • decorateImage

        public static org.eclipse.swt.graphics.Image decorateImage​(org.eclipse.swt.graphics.Image image,
                                                                   MarkerSeverity severity)
        Decorates image by severity icon.
        Parameters:
        image - the image for decoration, not null
        severity - severity, not null
        Returns:
        decorated image, not null
      • decorate

        public static void decorate​(IDecoration decoration,
                                    MarkerSeverity severity)
        Decorates image by severity icon.
        Parameters:
        decoration - the decoration to add icon, not null
        severity - severity, not null
      • addProblemDecoration

        public static ILabelProvider addProblemDecoration​(ILabelProvider labelProvider)
        Decorates the given label provider with bootom left problem icons.
        Parameters:
        labelProvider - label provider, not null
        Returns:
        new label provider with problem decoration, not null
      • addProblemDecoration

        public static ITableLabelProvider addProblemDecoration​(ITableLabelProvider tableLabelProvider,
                                                               int decoratingColumnIndex)
        Decorates the given table label provider column with bootom left problem icons.
        Parameters:
        tableLabelProvider - table label provider, not null
        decoratingColumnIndex - column number to decorate
        Returns:
        new table label provider with problem decoration, not null
      • addProblemDecoration

        public static ColumnLabelProvider addProblemDecoration​(ColumnLabelProvider columnLabelProvider)
        Decorates the given column label provider with bootom left problem icons.
        Parameters:
        columnLabelProvider - column label provider, not null
        Returns:
        new column label provider with problem decoration, not null
      • refreshOnProblemsChange

        public static void refreshOnProblemsChange​(Viewer viewer)
        Add problem change listener for viewer refresh and updates decorations.
        Parameters:
        viewer - viewer, not null