-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make fields sorted by lexicographical order #7711
Changes from 10 commits
914ebdf
b768728
5af1cdf
039152d
95d3b9c
9f82e30
34880e6
33da5f2
743d007
a7ffb9b
b6adbc4
5e98e24
0694347
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,12 @@ public class FieldFormatterCleanupsPanelViewModel { | |
private final ObjectProperty<Formatter> selectedFormatterProperty = new SimpleObjectProperty<>(); | ||
|
||
public FieldFormatterCleanupsPanelViewModel() { | ||
availableFieldsProperty.sort((field1, field2) -> { | ||
if (field1.getDisplayName().equals(field2.getDisplayName())) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The compareTo already performs equal checks... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What you said really makes sense and I have modified them. |
||
return 0; | ||
} | ||
return field1.getDisplayName().compareTo(field2.getDisplayName()) > 0 ? 1 : -1; | ||
}); | ||
} | ||
|
||
public void resetToRecommended() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.