Class FilterUtils


  • public class FilterUtils
    extends Object
    Utility class for filtering of the comparison tree.
    • Constructor Detail

      • FilterUtils

        public FilterUtils()
    • Method Detail

      • twoWayDifferences

        public static com._1c.g5.v8.dt.internal.compare.ui.editor.AbstractTwoWayViewerFilter twoWayDifferences​(ComparisonSide side1,
                                                                                                               ComparisonSide side2)
        Creates a two-way "differences" viewer filter for the specified sides.
        Parameters:
        side1 - the first side
        side2 - the second side
        Returns:
        a two-way viewer filter
      • twoWayChanged

        public static com._1c.g5.v8.dt.internal.compare.ui.editor.AbstractTwoWayViewerFilter twoWayChanged​(ComparisonSide side1,
                                                                                                           ComparisonSide side2)
        Creates a two-way "changed" viewer filter for the specified sides.
        Parameters:
        side1 - the first side
        side2 - the second side
        Returns:
        a two-way viewer filter
      • twoWayOnlyOnOneSide

        public static com._1c.g5.v8.dt.internal.compare.ui.editor.AbstractTwoWayViewerFilter twoWayOnlyOnOneSide​(ComparisonSide side1,
                                                                                                                 ComparisonSide side2,
                                                                                                                 String firstComparisonSideName)
        Creates a two-way "only on one side and not the other" viewer filter for the specified sides.
        Parameters:
        side1 - the first side, can not be null
        side2 - the second side, can not be null
        firstComparisonSideName - the first comparison side name, may be null
        Returns:
        a two-way viewer filter, never null
      • twoWayUnchanged

        public static com._1c.g5.v8.dt.internal.compare.ui.editor.AbstractTwoWayViewerFilter twoWayUnchanged​(ComparisonSide side1,
                                                                                                             ComparisonSide side2)
        Creates a two-way "unchanged" viewer filter for the specified sides.
        Parameters:
        side1 - the first side
        side2 - the second side
        Returns:
        a two-way viewer filter
      • twoWayPotentialProblems

        public static com._1c.g5.v8.dt.internal.compare.ui.editor.AbstractTwoWayViewerFilter twoWayPotentialProblems()
        Returns a two-way "potential problems" viewer filter.
        Returns:
        a two-way viewer filter, never null
      • getTwoWayFilters

        public static Map<ComparisonFilterKind,​INamedViewerFilter> getTwoWayFilters​(String mainComparisonSideName,
                                                                                          String otherComparisonSideName)
        Returns a map of two-way filters.
        Parameters:
        mainComparisonSideName - the main comparison side name, can not be null
        otherComparisonSideName - the other comparison side name, can not be null
        Returns:
        a map of two-way filters, never null
      • getThreeWayFilters

        public static Map<ComparisonFilterKind,​INamedViewerFilter> getThreeWayFilters​(String mainComparisonSideName,
                                                                                            String otherComparisonSideName)
        Returns a map of three-way filters.
        Parameters:
        mainComparisonSideName - the main comparison side name, can not be null
        otherComparisonSideName - the other comparison side name, can not be null
        Returns:
        a map of three-way filters, never null
      • getFilters

        public static Map<ComparisonFilterKind,​INamedViewerFilter> getFilters​(String mainComparisonSideName,
                                                                                    String otherComparisonSideName,
                                                                                    boolean isThreeWay)
        Returns a map of filters.
        Parameters:
        mainComparisonSideName - the main comparison side name, cannot be null
        otherComparisonSideName - the other comparison side name, cannot be null
        isThreeWay - true if the comparison is three-way, and false if it is two-way
        Returns:
        a map of filters, never null
      • twoWay

        public static com._1c.g5.v8.dt.internal.compare.ui.editor.AbstractTwoWayViewerFilter twoWay​(ComparisonFilterKind kind,
                                                                                                    ComparisonSide source,
                                                                                                    ComparisonSide target)
        Creates a two-way viewer filter for the specified kind and comparison direction.
        Parameters:
        kind - the two-way filter kind, can not be null
        source - the source side, can not be null
        target - the target side, can not be null
        Returns:
        a new two-way viewer filter, never null