Commit 47cf84ca authored by Alexander Weigl's avatar Alexander Weigl

add flags

parent e86b6f30
...@@ -21,9 +21,7 @@ import java.util.Map; ...@@ -21,9 +21,7 @@ import java.util.Map;
@Setter @Setter
public class InteractiveModeController { public class InteractiveModeController {
private static final Logger LOGGER = LogManager.getLogger(InteractiveModeController.class); private static final Logger LOGGER = LogManager.getLogger(InteractiveModeController.class);
private final Map<Node, Statements> cases = new HashMap<>(); private final Map<Node, Statements> cases = new HashMap<>();
private BooleanProperty activated = new SimpleBooleanProperty(); private BooleanProperty activated = new SimpleBooleanProperty();
...@@ -33,12 +31,14 @@ public class InteractiveModeController { ...@@ -33,12 +31,14 @@ public class InteractiveModeController {
public void start() { public void start() {
Events.register(this); Events.register(this);
cases.clear(); cases.clear();
activated.set(true);
} }
public void stop() { public void stop() {
Events.unregister(this); Events.unregister(this);
String c = getCasesAsString(); String c = getCasesAsString();
Events.fire(new Events.InsertAtTheEndOfMainScript(c)); Events.fire(new Events.InsertAtTheEndOfMainScript(c));
activated.set(false);
} }
@Subscribe @Subscribe
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment