File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
it.baeyens.arduino.core/src/it/baeyens/arduino Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 21
21
import it .baeyens .arduino .common .ConfigurationPreferences ;
22
22
import it .baeyens .arduino .ui .Activator ;
23
23
24
- public class Library implements Comparator <Library > {
24
+ public class Library implements Comparable <Library > {
25
25
26
26
private String name ;
27
27
private String version ;
@@ -210,8 +210,8 @@ public Collection<Path> getSources(IProject project) {
210
210
}
211
211
212
212
@ Override
213
- public int compare (Library o1 , Library o2 ) {
214
- return o1 . getName () .compareTo (o2 . getName () );
213
+ public int compareTo (Library other ) {
214
+ return this . name .compareTo (other . name );
215
215
}
216
216
217
217
public IStatus remove (IProgressMonitor monitor ) {
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ private void updateTable() {
109
109
for (String curCategory : categories ) {
110
110
Collection <Library > libraries = libraryIndex .getLibraries (curCategory );
111
111
List <Library > librarylist = new ArrayList <>(libraries );
112
- Collections .sort (librarylist , new Library () );
112
+ Collections .sort (librarylist );
113
113
114
114
String prefLibraryName = null ;
115
115
TableItem libraryItem = null ;
You can’t perform that action at this time.
0 commit comments