@@ -18,9 +18,10 @@ public class CheckForUnopenedExercises implements ActionListener {
18
18
public static boolean shouldRunOnStartup () {
19
19
return NbTmcSettings .getDefault ().isCheckingForUnopenedAtStartup ();
20
20
}
21
-
22
- private static final TmcNotificationDisplayer .SingletonToken notifierToken = TmcNotificationDisplayer .createSingletonToken ();
23
-
21
+
22
+ private static final TmcNotificationDisplayer .SingletonToken notifierToken =
23
+ TmcNotificationDisplayer .createSingletonToken ();
24
+
24
25
private ProjectMediator projects ;
25
26
private CourseDb courseDb ;
26
27
private TmcNotificationDisplayer notifier ;
@@ -30,14 +31,13 @@ public CheckForUnopenedExercises() {
30
31
this .courseDb = CourseDb .getInstance ();
31
32
this .notifier = TmcNotificationDisplayer .getDefault ();
32
33
}
33
-
34
+
34
35
@ Override
35
36
public void actionPerformed (ActionEvent e ) {
36
37
run ();
37
38
}
38
-
39
+
39
40
public void run () {
40
- // TODO(jamo): use bg task
41
41
projects .callWhenProjectsCompletelyOpened (new Runnable () {
42
42
@ Override
43
43
public void run () {
@@ -69,7 +69,7 @@ private void showNotification(List<Exercise> unopenedExercises) {
69
69
}
70
70
notifier .notify (notifierToken , msg , getNotificationIcon (), prompt , openAction (unopenedExercises ), NotificationDisplayer .Priority .LOW );
71
71
}
72
-
72
+
73
73
private ActionListener openAction (final List <Exercise > exercises ) {
74
74
return new ActionListener () {
75
75
@ Override
@@ -83,8 +83,8 @@ public void actionPerformed(ActionEvent e) {
83
83
}
84
84
};
85
85
}
86
-
86
+
87
87
private Icon getNotificationIcon () {
88
88
return ImageUtilities .loadImageIcon ("fi/helsinki/cs/tmc/smile.gif" , false );
89
89
}
90
- }
90
+ }
0 commit comments