Macro systeem veralgemeniseerd naar Sequence. Sequence maakt het mogelijk om de automatische toegevoegde events bij macro's te omzeilen. Hier wordt gebruik van gemaakt bij de Continuous task, want deze moet alle vrijheid hebben. Nu is in de vele shortcut-sequence add functies nog geen beveiliging om oneindige Continuous tasks uit te voeren. De verantwoordelijkheid hiervoor ligt bij de gebruiker of een toekomstige controle.
This commit is contained in:
@@ -11,7 +11,7 @@ public abstract class Application extends TaskListener {
|
||||
initialise();
|
||||
super.run();
|
||||
} catch (ApplicationInitialiseException e) {
|
||||
e.printStackTrace();
|
||||
e.printStackTrace(); // Todo: dit "over" de thread heengooien / loggen?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ public abstract class Application extends TaskListener {
|
||||
Action action = task.getAction();
|
||||
if (task instanceof Continuous) {
|
||||
Continuous continuous = (Continuous) task;
|
||||
int sleep = continuous.getSleep();
|
||||
do {
|
||||
action(action);
|
||||
sleep(sleep);
|
||||
continuous.nextIteration();
|
||||
sleep(continuous.getSleep());
|
||||
} while (run && !continuous.getStop());
|
||||
continuous.reset();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user