File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
app/src/cc/arduino/contributions/packages/ui Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 3636import processing .app .BaseNoGui ;
3737
3838import java .util .ArrayList ;
39+ import java .util .Collections ;
3940import java .util .List ;
4041import java .util .function .Predicate ;
4142import java .util .stream .Collectors ;
@@ -73,6 +74,18 @@ private void updateContributions() {
7374 addContribution (platform );
7475 }
7576 }
77+ Collections .sort (contributions , (x ,y )-> {
78+ if (x .isDeprecated () != y .isDeprecated ()) {
79+ return x .isDeprecated () ? 1 : -1 ;
80+ }
81+ ContributedPlatform x1 = x .getLatest ();
82+ ContributedPlatform y1 = y .getLatest ();
83+ int category = (x1 .getCategory ().equals ("Arduino" ) ? -1 : 0 ) + (y1 .getCategory ().equals ("Arduino" ) ? 1 : 0 );
84+ if (category != 0 ) {
85+ return category ;
86+ }
87+ return x1 .getName ().compareToIgnoreCase (y1 .getName ());
88+ });
7689 fireTableDataChanged ();
7790 }
7891
You can’t perform that action at this time.
0 commit comments