X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Fnature%2FMachineContext.java;h=1be6b2aa5ce674736af4654d6a19c23d30968eea;hb=da1a7df25582ae1fe277762c2ba5640d4697a71c;hp=55316813aa6ef7f86d6597cd738660c4e06ddc85;hpb=500771048185ce356aed280970f5ff0f4473a146;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/MachineContext.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/MachineContext.java index 55316813..1be6b2aa 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/MachineContext.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/MachineContext.java @@ -1,6 +1,13 @@ package net.mograsim.plugin.nature; -import static net.mograsim.plugin.nature.MachineContextStatus.*; +import static net.mograsim.plugin.nature.MachineContextStatus.ACTIVE; +import static net.mograsim.plugin.nature.MachineContextStatus.ACTIVE_CHANGED; +import static net.mograsim.plugin.nature.MachineContextStatus.BROKEN; +import static net.mograsim.plugin.nature.MachineContextStatus.CLOSED; +import static net.mograsim.plugin.nature.MachineContextStatus.DEAD; +import static net.mograsim.plugin.nature.MachineContextStatus.INTACT; +import static net.mograsim.plugin.nature.MachineContextStatus.READY; +import static net.mograsim.plugin.nature.MachineContextStatus.UNKOWN; import java.io.IOException; import java.util.HashSet; @@ -63,7 +70,7 @@ public class MachineContext */ public final boolean isCurrentyValid() { - return status == READY || status == ACTIVE; + return status == READY || isActive(); } /** @@ -147,8 +154,6 @@ public class MachineContext if (status == ACTIVE) return true; machineDefinition.ifPresent(md -> setActiveMachine(md.createNew())); - if (activeMachine.isPresent()) - System.out.format("Created new machine %s for project %s%n", activeMachine.get().getDefinition().getId(), owner.getName()); updateStatus(); return isActive(); } @@ -172,7 +177,6 @@ public class MachineContext if (oldStatus == newStatus) return; status = newStatus; - System.out.format("Project %s context status: %s -> %s%n", owner.getName(), oldStatus, newStatus); doPostStatusChangedAction(); notifyMachineContextStatusListeners(oldStatus); } @@ -204,7 +208,6 @@ public class MachineContext { if ((status == DEAD || status == CLOSED) && activeMachine.isPresent()) { - System.out.format("Removed machine %s for project %s%n", activeMachine.get().getDefinition().getId(), owner.getName()); activeMachine = Optional.empty(); notifyActiveMachineListeners(); }