@@ -31,8 +31,8 @@ public class BreakpointTypeCategory extends PlatformObject implements IBreakpoin
31
31
32
32
private final String fName ;
33
33
private ImageDescriptor fImageDescriptor = DebugPluginImages .getImageDescriptor (IInternalDebugUIConstants .IMG_OBJS_BREAKPOINT_TYPE );
34
- private boolean fSortOrder ;
35
- private int fOrder ;
34
+ private boolean fSortable ;
35
+ private int fSortPriority ;
36
36
/**
37
37
* Constructs a type category for the given type name.
38
38
*
@@ -57,18 +57,17 @@ public BreakpointTypeCategory(String name, ImageDescriptor descriptor) {
57
57
}
58
58
59
59
/**
60
- * Constructs a type category for the given type name with the given attributes
61
- * for sorting order .
60
+ * Constructs a type category for the given type name with the given sort
61
+ * priority .
62
62
*
63
- * @param name breakpoint type name
64
- * @param sortOrder to sort order or not
65
- * @param order order of the group
63
+ * @param name breakpoint type name
64
+ * @param sortPriority used to calculate the sort order of this category
66
65
* @since 3.19
67
66
*/
68
- public BreakpointTypeCategory (String name , boolean sortOrder , int order ) {
67
+ public BreakpointTypeCategory (String name , int sortPriority ) {
69
68
fName = name ;
70
- fSortOrder = sortOrder ;
71
- fOrder = order ;
69
+ fSortable = true ;
70
+ fSortPriority = sortPriority ;
72
71
}
73
72
74
73
/**
@@ -81,14 +80,15 @@ protected String getName() {
81
80
}
82
81
83
82
/**
84
- * Returns the order of this category's placement .
83
+ * Returns the sorting priority of this category.
85
84
*
86
- * @return the order of this category's placement.
85
+ * @return the sorting priority of this category, default is {@code 0}
87
86
* @since 3.19
88
87
*/
89
- public int getOrder () {
90
- return fOrder ;
88
+ public int getSortPriority () {
89
+ return fSortPriority ;
91
90
}
91
+
92
92
@ Override
93
93
public boolean equals (Object object ) {
94
94
if (object instanceof BreakpointTypeCategory type ) {
@@ -98,13 +98,13 @@ public boolean equals(Object object) {
98
98
}
99
99
100
100
/**
101
- * Returns whether category should follow a sorting order or not.
101
+ * Returns whether category has some sort order or not.
102
102
*
103
- * @return whether category should be sorted or not.
103
+ * @return whether category can be sorted or not.
104
104
* @since 3.19
105
105
*/
106
- public boolean hasSortOrder () {
107
- return fSortOrder ;
106
+ public boolean isSortable () {
107
+ return fSortable ;
108
108
}
109
109
110
110
@ Override
0 commit comments