File tree 1 file changed +10
-0
lines changed
BAR/src/main/java/bar/plugin
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 22
22
import java .nio .file .Paths ;
23
23
import java .util .ArrayList ;
24
24
import java .util .Collections ;
25
+ import java .util .Comparator ;
25
26
import java .util .Iterator ;
26
27
import java .util .stream .Stream ;
27
28
@@ -59,6 +60,15 @@ public void run() {
59
60
uiService .showDialog ("Could not load tutorial files." , DialogPrompt .MessageType .ERROR_MESSAGE );
60
61
return ;
61
62
}
63
+
64
+ // Ensure files are opened in the right order
65
+ urls .sort (new Comparator <URL >() {
66
+ @ Override
67
+ public int compare (final URL u1 , final URL u2 ) {
68
+ return u1 .toString ().compareTo (u2 .toString ());
69
+ }
70
+
71
+ });
62
72
final TextEditor editor = new TextEditor (context );
63
73
for (final URL url : urls ) {
64
74
statusService .showStatus (urls .indexOf (url ), urls .size (), "Opening tutorial files..." );
You can’t perform that action at this time.
0 commit comments