Class MdSortPreferences


  • public final class MdSortPreferences
    extends Object
    Constants and utility methods for metadata objects sort preferences in the project.
    • Field Detail

      • NATURAL_SORT_ORDER

        public static final String NATURAL_SORT_ORDER
        Key for the natural sort order flag.
        See Also:
        Constant Field Values
      • DEFAULT_ASCENDING_SORT

        public static final boolean DEFAULT_ASCENDING_SORT
        The key for the default value of the ascending sort direction flag.
        See Also:
        Constant Field Values
      • DEFAULT_NATURAL_SORT_ORDER

        public static final boolean DEFAULT_NATURAL_SORT_ORDER
        The key for the default value of the natural sort order flag.
        See Also:
        Constant Field Values
    • Method Detail

      • isAscendingSort

        public static boolean isAscendingSort​(org.eclipse.core.resources.IProject project)
        Checks if the sort direction is ascending in the project. By default returns true.
        Parameters:
        project - the project to check, cannot be null
        Returns:
        true if the sort is ascending, false otherwise
      • isNaturalSortOrder

        public static boolean isNaturalSortOrder​(org.eclipse.core.resources.IProject project)
        Checks if the sort order natural or as in the designer in the project. By default returns true.
        Parameters:
        project - the project to check, cannot be null
        Returns:
        true if the sort order is natural, false if the sort order is as in the designer
      • getPreferences

        public static org.eclipse.core.runtime.preferences.IEclipsePreferences getPreferences​(org.eclipse.core.resources.IProject project)
        Returns the project preferences.
        Parameters:
        project - the project to get the preferences for, cannot be null
        Returns:
        the project preferences, never null