diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.CreateArea.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.CreateArea.java._trace deleted file mode 100644 index ace5800..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.CreateArea.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Exit.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Exit.java._trace deleted file mode 100644 index 1f07b20..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Exit.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Explode.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Explode.java._trace deleted file mode 100644 index 46901d7..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Explode.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Fire.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Fire.java._trace deleted file mode 100644 index 4394883..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Fire.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Fire.sarlbin b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Fire.sarlbin deleted file mode 100644 index fe88a4c..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Fire.sarlbin and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.FirePos.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.FirePos.java._trace deleted file mode 100644 index fffd299..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.FirePos.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.FireReady.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.FireReady.java._trace deleted file mode 100644 index b96a066..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.FireReady.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Firework.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Firework.java._trace index 2543bb5..93456e5 100644 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Firework.java._trace and b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Firework.java._trace differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Freeze.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Freeze.java._trace deleted file mode 100644 index 25929d2..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Freeze.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.KillFire.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.KillFire.java._trace deleted file mode 100644 index a34b1c5..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.KillFire.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.KillRocket.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.KillRocket.java._trace deleted file mode 100644 index 0e8aff6..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.KillRocket.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Launch.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Launch.java._trace deleted file mode 100644 index 0baaf75..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Launch.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.LaunchingArea.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.LaunchingArea.java._trace deleted file mode 100644 index 5e7845f..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.LaunchingArea.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.LaunchingArea.sarlbin b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.LaunchingArea.sarlbin deleted file mode 100644 index e8ee0bb..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.LaunchingArea.sarlbin and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Positions.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Positions.java._trace deleted file mode 100644 index 2a3ebf8..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Positions.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Positions.sarlbin b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Positions.sarlbin deleted file mode 100644 index ed79a23..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Positions.sarlbin and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Rocket.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Rocket.java._trace deleted file mode 100644 index 1cb9341..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Rocket.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Rocket.sarlbin b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Rocket.sarlbin deleted file mode 100644 index ab9cd9d..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.Rocket.sarlbin and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketLauncher.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketLauncher.java._trace deleted file mode 100644 index 6619fa9..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketLauncher.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketLauncher.sarlbin b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketLauncher.sarlbin deleted file mode 100644 index da82844..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketLauncher.sarlbin and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketReady.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketReady.java._trace deleted file mode 100644 index 5426455..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketReady.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketsPos.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketsPos.java._trace deleted file mode 100644 index f3bdfea..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.RocketsPos.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.SetupSettings.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.SetupSettings.java._trace deleted file mode 100644 index 62ceffd..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.SetupSettings.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.SprayFire.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.SprayFire.java._trace deleted file mode 100644 index 44c5dad..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.SprayFire.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.UpdateFirePosition.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.UpdateFirePosition.java._trace deleted file mode 100644 index 636d473..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.UpdateFirePosition.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.UpdateRocketPosition.java._trace b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.UpdateRocketPosition.java._trace deleted file mode 100644 index 06363cf..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.UpdateRocketPosition.java._trace and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.fireworks.sarlbin b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.fireworks.sarlbin deleted file mode 100644 index 2d0945b..0000000 Binary files a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/.fireworks.sarlbin and /dev/null differ diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/CreateArea.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/CreateArea.java deleted file mode 100644 index 2b7706b..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/CreateArea.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class CreateArea extends Event { - @SyntheticMember - public CreateArea() { - super(); - } - - @SyntheticMember - public CreateArea(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Exit.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Exit.java deleted file mode 100644 index 1c8b7a7..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Exit.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class Exit extends Event { - @SyntheticMember - public Exit() { - super(); - } - - @SyntheticMember - public Exit(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Explode.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Explode.java deleted file mode 100644 index e0067ff..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Explode.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class Explode extends Event { - @SyntheticMember - public Explode() { - super(); - } - - @SyntheticMember - public Explode(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Fire.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Fire.java deleted file mode 100644 index 9385291..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Fire.java +++ /dev/null @@ -1,458 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.core.AgentTask; -import io.sarl.core.Behaviors; -import io.sarl.core.DefaultContextInteractions; -import io.sarl.core.ExternalContextAccess; -import io.sarl.core.Initialize; -import io.sarl.core.Lifecycle; -import io.sarl.core.Logging; -import io.sarl.core.Schedules; -import io.sarl.core.Time; -import io.sarl.demos.fireworks.Exit; -import io.sarl.demos.fireworks.FireReady; -import io.sarl.demos.fireworks.Freeze; -import io.sarl.demos.fireworks.Positions; -import io.sarl.demos.fireworks.UpdateFirePosition; -import io.sarl.lang.annotation.ImportedCapacityFeature; -import io.sarl.lang.annotation.PerceptGuardEvaluator; -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Agent; -import io.sarl.lang.core.BuiltinCapacitiesProvider; -import io.sarl.lang.core.Skill; -import io.sarl.lang.util.ClearableReference; -import io.sarl.util.Scopes; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.UUID; -import java.util.Vector; -import java.util.function.Consumer; -import javax.inject.Inject; -import org.eclipse.xtext.xbase.lib.Conversions; -import org.eclipse.xtext.xbase.lib.DoubleExtensions; -import org.eclipse.xtext.xbase.lib.Exceptions; -import org.eclipse.xtext.xbase.lib.Extension; -import org.eclipse.xtext.xbase.lib.Inline; -import org.eclipse.xtext.xbase.lib.IterableExtensions; -import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; -import org.eclipse.xtext.xbase.lib.Procedures.Procedure2; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class Fire extends Agent { - private List x; - - private List y; - - private int lifetime = 300; - - private boolean frozen = false; - - private boolean destroyed = false; - - private boolean exited = false; - - private Positions grid; - - private Double xf; - - private Double yf; - - private UUID id = UUID.randomUUID(); - - private UUID parentID; - - private AgentTask move; - - private UUID parentAgent; - - @SyntheticMember - private void $behaviorUnit$Freeze$0(final Freeze occurrence) { - this.frozen = occurrence.value; - if (this.frozen) { - Schedules _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER = this.$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER.cancel(this.move, true); - } else { - Behaviors _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER = this.$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - UpdateFirePosition _updateFirePosition = new UpdateFirePosition(); - _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER.wake(_updateFirePosition); - } - } - - @SyntheticMember - private void $behaviorUnit$Initialize$1(final Initialize occurrence) { - ArrayList _arrayList = new ArrayList(); - this.x = _arrayList; - ArrayList _arrayList_1 = new ArrayList(); - this.y = _arrayList_1; - boolean _equals = Integer.valueOf(((List)Conversions.doWrapArray(occurrence.parameters)).size()).equals(Integer.valueOf(4)); - if (_equals) { - Object _get = occurrence.parameters[0]; - this.x.add(((Double) _get)); - Object _get_1 = occurrence.parameters[1]; - this.y.add(((Double) _get_1)); - Object _get_2 = occurrence.parameters[2]; - this.grid = ((Positions) _get_2); - Object _get_3 = occurrence.parameters[3]; - this.parentID = ((UUID) _get_3); - } else { - Logging _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER = this.$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER.info("Error in fire Initialize : bad parameter number"); - } - this.parentAgent = occurrence.spawner; - double _random = Math.random(); - double _multiply = (_random * 10.0); - double _random_1 = Math.random(); - double _multiply_1 = (_random_1 * 5); - double _minus = (_multiply - _multiply_1); - this.xf = Double.valueOf(_minus); - double _random_2 = Math.random(); - double _multiply_2 = (_random_2 * 10.0); - double _plus = (_multiply_2 + 1.0); - this.yf = Double.valueOf(_plus); - } - - @SyntheticMember - private void $behaviorUnit$FireReady$2(final FireReady occurrence) { - Schedules _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER = this.$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - final Procedure1 _function = (Agent it) -> { - try { - Behaviors _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER = this.$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - UpdateFirePosition _updateFirePosition = new UpdateFirePosition(); - _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER.wake(_updateFirePosition); - } catch (final Throwable _t) { - if (_t instanceof Exception) { - final Exception e = (Exception)_t; - e.printStackTrace(); - } else { - throw Exceptions.sneakyThrow(_t); - } - } - }; - this.move = _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER.atFixedDelay(30, _function); - } - - @SyntheticMember - private void $behaviorUnit$UpdateFirePosition$3(final UpdateFirePosition occurrence) { - Double _last = IterableExtensions.last(this.x); - double newx = DoubleExtensions.operator_plus(_last, this.xf); - Double _last_1 = IterableExtensions.last(this.y); - double newy = DoubleExtensions.operator_plus(_last_1, this.yf); - this.x.add(Double.valueOf(newx)); - this.y.add(Double.valueOf(newy)); - if ((this.grid != null)) { - ArrayList> list = new ArrayList>(); - final Consumer _function = (Double pos) -> { - Vector nvect = new Vector(2); - nvect.add(pos); - list.add(nvect); - }; - this.x.forEach(_function); - final Procedure2 _function_1 = (Double pos, Integer i) -> { - Vector nvect = list.get((i).intValue()); - nvect.add(pos); - list.set((i).intValue(), nvect); - }; - IterableExtensions.forEach(this.y, _function_1); - this.grid.setFirePosition(this.id, this.parentID, list); - } - this.lifetime = (this.lifetime - 10); - if ((this.lifetime <= 0)) { - this.grid.removeFirePosition(this.id); - this.cleanBeforeExit(); - Schedules _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER = this.$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - final Procedure1 _function_2 = (Agent it) -> { - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.killMe(); - }; - _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER.in(1000, _function_2); - } - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$UpdateFirePosition$3(final UpdateFirePosition it, final UpdateFirePosition occurrence) { - return ((this.isFromMe(occurrence) && (!this.frozen)) && (!this.destroyed)); - } - - protected boolean cleanBeforeExit() { - boolean _xblockexpression = false; - { - Schedules _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER = this.$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER.cancel(this.move, true); - this.exited = true; - _xblockexpression = this.destroyed = true; - } - return _xblockexpression; - } - - @SyntheticMember - private void $behaviorUnit$Exit$4(final Exit occurrence) { - this.frozen = true; - this.cleanBeforeExit(); - DefaultContextInteractions _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER = this.$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - Exit _exit = new Exit(); - DefaultContextInteractions _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER_1 = this.$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER.emit(_exit, Scopes.addresses(_$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER_1.getDefaultSpace().getAddress(this.parentAgent))); - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.killMe(); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Exit$4(final Exit it, final Exit occurrence) { - return ((!this.exited) && it.isFrom(this.getParentID())); - } - - @Extension - @ImportedCapacityFeature(Lifecycle.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_LIFECYCLE; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE)", imported = Lifecycle.class) - private Lifecycle $CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class); - } - return $castSkill(Lifecycle.class, this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - } - - @Extension - @ImportedCapacityFeature(Logging.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_LOGGING; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING)", imported = Logging.class) - private Logging $CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class); - } - return $castSkill(Logging.class, this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - } - - @Extension - @ImportedCapacityFeature(Behaviors.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_BEHAVIORS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS)", imported = Behaviors.class) - private Behaviors $CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class); - } - return $castSkill(Behaviors.class, this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - } - - @Extension - @ImportedCapacityFeature(DefaultContextInteractions.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS)", imported = DefaultContextInteractions.class) - private DefaultContextInteractions $CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class); - } - return $castSkill(DefaultContextInteractions.class, this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - } - - @Extension - @ImportedCapacityFeature(ExternalContextAccess.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(ExternalContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS = $getSkill(ExternalContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS)", imported = ExternalContextAccess.class) - private ExternalContextAccess $CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS = $getSkill(ExternalContextAccess.class); - } - return $castSkill(ExternalContextAccess.class, this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS); - } - - @Extension - @ImportedCapacityFeature(Schedules.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_SCHEDULES; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES)", imported = Schedules.class) - private Schedules $CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class); - } - return $castSkill(Schedules.class, this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - } - - @Extension - @ImportedCapacityFeature(Time.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_TIME; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Time.class, (this.$CAPACITY_USE$IO_SARL_CORE_TIME == null || this.$CAPACITY_USE$IO_SARL_CORE_TIME.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_TIME = $getSkill(Time.class)) : this.$CAPACITY_USE$IO_SARL_CORE_TIME)", imported = Time.class) - private Time $CAPACITY_USE$IO_SARL_CORE_TIME$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_TIME == null || this.$CAPACITY_USE$IO_SARL_CORE_TIME.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_TIME = $getSkill(Time.class); - } - return $castSkill(Time.class, this.$CAPACITY_USE$IO_SARL_CORE_TIME); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Initialize(final Initialize occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Initialize$1(occurrence)); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$FireReady(final FireReady occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$FireReady$2(occurrence)); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Freeze(final Freeze occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Freeze$0(occurrence)); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Exit(final Exit occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$Exit$4(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Exit$4(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$UpdateFirePosition(final UpdateFirePosition occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$UpdateFirePosition$3(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$UpdateFirePosition$3(occurrence)); - } - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Fire other = (Fire) obj; - if (this.x == null) { - if (other.x != null) - return false; - } else if (!this.x.equals(other.x)) - return false; - if (this.y == null) { - if (other.y != null) - return false; - } else if (!this.y.equals(other.y)) - return false; - if (other.lifetime != this.lifetime) - return false; - if (other.frozen != this.frozen) - return false; - if (other.destroyed != this.destroyed) - return false; - if (other.exited != this.exited) - return false; - if (this.grid == null) { - if (other.grid != null) - return false; - } else if (!this.grid.equals(other.grid)) - return false; - if (this.xf == null) { - if (other.xf != null) - return false; - } else if (!this.xf.equals(other.xf)) - return false; - if (this.yf == null) { - if (other.yf != null) - return false; - } else if (!this.yf.equals(other.yf)) - return false; - if (this.id == null) { - if (other.id != null) - return false; - } else if (!this.id.equals(other.id)) - return false; - if (this.parentID == null) { - if (other.parentID != null) - return false; - } else if (!this.parentID.equals(other.parentID)) - return false; - if (this.move == null) { - if (other.move != null) - return false; - } else if (!this.move.equals(other.move)) - return false; - if (this.parentAgent == null) { - if (other.parentAgent != null) - return false; - } else if (!this.parentAgent.equals(other.parentAgent)) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((this.x== null) ? 0 : this.x.hashCode()); - result = prime * result + ((this.y== null) ? 0 : this.y.hashCode()); - result = prime * result + this.lifetime; - result = prime * result + (this.frozen ? 1231 : 1237); - result = prime * result + (this.destroyed ? 1231 : 1237); - result = prime * result + (this.exited ? 1231 : 1237); - result = prime * result + ((this.grid== null) ? 0 : this.grid.hashCode()); - result = prime * result + ((this.xf== null) ? 0 : this.xf.hashCode()); - result = prime * result + ((this.yf== null) ? 0 : this.yf.hashCode()); - result = prime * result + ((this.id== null) ? 0 : this.id.hashCode()); - result = prime * result + ((this.parentID== null) ? 0 : this.parentID.hashCode()); - result = prime * result + ((this.move== null) ? 0 : this.move.hashCode()); - result = prime * result + ((this.parentAgent== null) ? 0 : this.parentAgent.hashCode()); - return result; - } - - @SyntheticMember - public Fire(final UUID parentID, final UUID agentID) { - super(parentID, agentID); - } - - @SyntheticMember - @Inject - public Fire(final BuiltinCapacitiesProvider provider, final UUID parentID, final UUID agentID) { - super(provider, parentID, agentID); - } -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/FirePos.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/FirePos.java deleted file mode 100644 index 543dbc7..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/FirePos.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import java.util.List; -import java.util.Vector; -import javafx.scene.paint.Color; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class FirePos { - public final int FIREREFRESHDELAY = 100; - - private List> positions; - - private Color color; - - @Pure - public List> getPositions() { - return this.positions; - } - - public List> setPositions(final List> positions) { - return this.positions = positions; - } - - @Pure - public Color getColor() { - return this.color; - } - - public Color setColor(final Color color) { - return this.color = color; - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - FirePos other = (FirePos) obj; - if (other.FIREREFRESHDELAY != this.FIREREFRESHDELAY) - return false; - if (this.positions == null) { - if (other.positions != null) - return false; - } else if (!this.positions.equals(other.positions)) - return false; - if (this.color == null) { - if (other.color != null) - return false; - } else if (!this.color.equals(other.color)) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + this.FIREREFRESHDELAY; - result = prime * result + ((this.positions== null) ? 0 : this.positions.hashCode()); - result = prime * result + ((this.color== null) ? 0 : this.color.hashCode()); - return result; - } - - @SyntheticMember - public FirePos() { - super(); - } -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/FireReady.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/FireReady.java deleted file mode 100644 index 3c1971d..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/FireReady.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class FireReady extends Event { - @SyntheticMember - public FireReady() { - super(); - } - - @SyntheticMember - public FireReady(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Firework.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Firework.java index 203277b..7889052 100644 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Firework.java +++ b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Firework.java @@ -2,13 +2,13 @@ package io.sarl.demos.fireworks; import io.janusproject.Boot; import io.janusproject.kernel.Kernel; -import io.sarl.demos.fireworks.FXMLViewerController; -import io.sarl.demos.fireworks.LaunchingArea; +import io.sarl.demos.fireworks.agents.LaunchingArea; +import io.sarl.demos.fireworks.gui.FXMLViewerController; import io.sarl.lang.annotation.SarlSpecification; import io.sarl.lang.annotation.SyntheticMember; import org.eclipse.xtext.xbase.lib.Exceptions; -@SarlSpecification("0.5") +@SarlSpecification("0.6") @SuppressWarnings("all") public class Firework { public static Kernel main(final FXMLViewerController controller) { diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Freeze.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Freeze.java deleted file mode 100644 index f7f889f..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Freeze.java +++ /dev/null @@ -1,56 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Event; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class Freeze extends Event { - public boolean value; - - public Freeze(final boolean value) { - this.value = value; - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Freeze other = (Freeze) obj; - if (other.value != this.value) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + (this.value ? 1231 : 1237); - return result; - } - - /** - * Returns a String representation of the Freeze event's attributes only. - */ - @SyntheticMember - @Pure - protected String attributesToString() { - StringBuilder result = new StringBuilder(super.attributesToString()); - result.append("value = ").append(this.value); - return result.toString(); - } - - @SyntheticMember - private final static long serialVersionUID = 2771119382L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/KillFire.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/KillFire.java deleted file mode 100644 index 2e4644d..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/KillFire.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class KillFire extends Event { - @SyntheticMember - public KillFire() { - super(); - } - - @SyntheticMember - public KillFire(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/KillRocket.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/KillRocket.java deleted file mode 100644 index 44af744..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/KillRocket.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class KillRocket extends Event { - @SyntheticMember - public KillRocket() { - super(); - } - - @SyntheticMember - public KillRocket(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Launch.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Launch.java deleted file mode 100644 index 958791c..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Launch.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class Launch extends Event { - @SyntheticMember - public Launch() { - super(); - } - - @SyntheticMember - public Launch(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/LaunchingArea.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/LaunchingArea.java deleted file mode 100644 index 265b9a9..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/LaunchingArea.java +++ /dev/null @@ -1,391 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.core.Behaviors; -import io.sarl.core.DefaultContextInteractions; -import io.sarl.core.ExternalContextAccess; -import io.sarl.core.Initialize; -import io.sarl.core.InnerContextAccess; -import io.sarl.core.Lifecycle; -import io.sarl.core.Logging; -import io.sarl.core.MemberJoined; -import io.sarl.demos.fireworks.CreateArea; -import io.sarl.demos.fireworks.Exit; -import io.sarl.demos.fireworks.FXMLViewerController; -import io.sarl.demos.fireworks.Freeze; -import io.sarl.demos.fireworks.Launch; -import io.sarl.demos.fireworks.Positions; -import io.sarl.demos.fireworks.RocketLauncher; -import io.sarl.demos.fireworks.SetupSettings; -import io.sarl.lang.annotation.ImportedCapacityFeature; -import io.sarl.lang.annotation.PerceptGuardEvaluator; -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Agent; -import io.sarl.lang.core.BuiltinCapacitiesProvider; -import io.sarl.lang.core.Skill; -import io.sarl.lang.util.ClearableReference; -import io.sarl.util.OpenEventSpace; -import io.sarl.util.OpenEventSpaceSpecification; -import java.util.Collection; -import java.util.List; -import java.util.Random; -import java.util.UUID; -import javax.inject.Inject; -import org.eclipse.xtext.xbase.lib.Conversions; -import org.eclipse.xtext.xbase.lib.Extension; -import org.eclipse.xtext.xbase.lib.Inline; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class LaunchingArea extends Agent { - private Integer rocketsQuantity; - - private Integer fireQuantity; - - private Double gravity; - - private Positions grid = new Positions(); - - private double maxWidth = 10.0; - - private boolean exited = false; - - @SyntheticMember - private void $behaviorUnit$SetupSettings$0(final SetupSettings occurrence) { - this.rocketsQuantity = occurrence.rocketsQuantity; - this.fireQuantity = occurrence.fireQuatity; - this.gravity = occurrence.gravity; - this.maxWidth = (occurrence.maxWidth).doubleValue(); - } - - @SyntheticMember - private void $behaviorUnit$Exit$1(final Exit occurrence) { - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.killMe(); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Exit$1(final Exit it, final Exit occurrence) { - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - boolean _hasMemberAgent = _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.hasMemberAgent(); - boolean _not = (!_hasMemberAgent); - return _not; - } - - @SyntheticMember - private void $behaviorUnit$Exit$2(final Exit occurrence) { - this.exited = true; - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - Exit _exit = new Exit(); - _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext().getDefaultSpace().emit(_exit, null); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Exit$2(final Exit it, final Exit occurrence) { - return (this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS).hasMemberAgent() && (!this.exited)); - } - - @SyntheticMember - private void $behaviorUnit$Initialize$3(final Initialize occurrence) { - this.rocketsQuantity = Integer.valueOf(20); - this.fireQuantity = Integer.valueOf(30); - this.gravity = Double.valueOf(0.5); - Logging _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER = this.$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER.info("Setup Area"); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Initialize$3(final Initialize it, final Initialize occurrence) { - boolean _isEmpty = ((List)Conversions.doWrapArray(occurrence.parameters)).isEmpty(); - return _isEmpty; - } - - @SyntheticMember - private void $behaviorUnit$Initialize$4(final Initialize occurrence) { - Object _get = occurrence.parameters[0]; - FXMLViewerController ctrl = ((FXMLViewerController) _get); - DefaultContextInteractions _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER = this.$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - OpenEventSpace space = _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER.getDefaultContext().createSpace(OpenEventSpaceSpecification.class, UUID.randomUUID()); - ctrl.setGUISpace(space); - Behaviors _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER = this.$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - space.register(_$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER.asEventListener()); - ctrl.listenAndDraw(this.grid); - Logging _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER = this.$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER.info("Setup Area"); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Initialize$4(final Initialize it, final Initialize occurrence) { - boolean _isEmpty = ((List)Conversions.doWrapArray(occurrence.parameters)).isEmpty(); - boolean _not = (!_isEmpty); - return _not; - } - - @SyntheticMember - private void $behaviorUnit$CreateArea$5(final CreateArea occurrence) { - Double x = null; - int i = 0; - Random rnd = new Random(); - while ((i < (this.rocketsQuantity).intValue())) { - { - double _nextDouble = rnd.nextDouble(); - double _multiply = (_nextDouble * this.maxWidth); - x = Double.valueOf(_multiply); - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.spawnInContext(RocketLauncher.class, _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext(), x, Double.valueOf(0.0), this.fireQuantity, this.gravity, this.grid); - i++; - } - } - } - - @SyntheticMember - private void $behaviorUnit$Freeze$6(final Freeze occurrence) { - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext().getDefaultSpace().emit(occurrence, null); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Freeze$6(final Freeze it, final Freeze occurrence) { - boolean _isFromMe = this.isFromMe(occurrence); - boolean _not = (!_isFromMe); - return _not; - } - - @SyntheticMember - private void $behaviorUnit$MemberJoined$7(final MemberJoined occurrence) { - Logging _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER = this.$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER.info("Area Ready"); - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - Launch _launch = new Launch(); - _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext().getDefaultSpace().emit(_launch, null); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$MemberJoined$7(final MemberJoined it, final MemberJoined occurrence) { - return (this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS).isInInnerDefaultSpace(occurrence) && (this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS).getMemberAgentCount() == (this.rocketsQuantity).intValue())); - } - - @Extension - @ImportedCapacityFeature(DefaultContextInteractions.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS)", imported = DefaultContextInteractions.class) - private DefaultContextInteractions $CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class); - } - return $castSkill(DefaultContextInteractions.class, this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - } - - @Extension - @ImportedCapacityFeature(Lifecycle.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_LIFECYCLE; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE)", imported = Lifecycle.class) - private Lifecycle $CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class); - } - return $castSkill(Lifecycle.class, this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - } - - @Extension - @ImportedCapacityFeature(Behaviors.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_BEHAVIORS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS)", imported = Behaviors.class) - private Behaviors $CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class); - } - return $castSkill(Behaviors.class, this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - } - - @Extension - @ImportedCapacityFeature(Logging.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_LOGGING; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING)", imported = Logging.class) - private Logging $CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class); - } - return $castSkill(Logging.class, this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - } - - @Extension - @ImportedCapacityFeature(InnerContextAccess.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS)", imported = InnerContextAccess.class) - private InnerContextAccess $CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class); - } - return $castSkill(InnerContextAccess.class, this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - } - - @Extension - @ImportedCapacityFeature(ExternalContextAccess.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(ExternalContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS = $getSkill(ExternalContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS)", imported = ExternalContextAccess.class) - private ExternalContextAccess $CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS = $getSkill(ExternalContextAccess.class); - } - return $castSkill(ExternalContextAccess.class, this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Initialize(final Initialize occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$Initialize$3(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Initialize$3(occurrence)); - } - if ($behaviorUnitGuard$Initialize$4(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Initialize$4(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$SetupSettings(final SetupSettings occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$SetupSettings$0(occurrence)); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Freeze(final Freeze occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$Freeze$6(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Freeze$6(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Exit(final Exit occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$Exit$1(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Exit$1(occurrence)); - } - if ($behaviorUnitGuard$Exit$2(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Exit$2(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$CreateArea(final CreateArea occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$CreateArea$5(occurrence)); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$MemberJoined(final MemberJoined occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$MemberJoined$7(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$MemberJoined$7(occurrence)); - } - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - LaunchingArea other = (LaunchingArea) obj; - if (this.rocketsQuantity == null) { - if (other.rocketsQuantity != null) - return false; - } else if (!this.rocketsQuantity.equals(other.rocketsQuantity)) - return false; - if (this.fireQuantity == null) { - if (other.fireQuantity != null) - return false; - } else if (!this.fireQuantity.equals(other.fireQuantity)) - return false; - if (this.gravity == null) { - if (other.gravity != null) - return false; - } else if (!this.gravity.equals(other.gravity)) - return false; - if (this.grid == null) { - if (other.grid != null) - return false; - } else if (!this.grid.equals(other.grid)) - return false; - if (Double.doubleToLongBits(other.maxWidth) != Double.doubleToLongBits(this.maxWidth)) - return false; - if (other.exited != this.exited) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((this.rocketsQuantity== null) ? 0 : this.rocketsQuantity.hashCode()); - result = prime * result + ((this.fireQuantity== null) ? 0 : this.fireQuantity.hashCode()); - result = prime * result + ((this.gravity== null) ? 0 : this.gravity.hashCode()); - result = prime * result + ((this.grid== null) ? 0 : this.grid.hashCode()); - result = prime * result + (int) (Double.doubleToLongBits(this.maxWidth) ^ (Double.doubleToLongBits(this.maxWidth) >>> 32)); - result = prime * result + (this.exited ? 1231 : 1237); - return result; - } - - @SyntheticMember - public LaunchingArea(final UUID parentID, final UUID agentID) { - super(parentID, agentID); - } - - @SyntheticMember - @Inject - public LaunchingArea(final BuiltinCapacitiesProvider provider, final UUID parentID, final UUID agentID) { - super(provider, parentID, agentID); - } -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Positions.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Positions.java deleted file mode 100644 index d9b54b7..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Positions.java +++ /dev/null @@ -1,143 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.demos.fireworks.FirePos; -import io.sarl.demos.fireworks.RocketsPos; -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import java.util.Vector; -import javafx.scene.paint.Color; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class Positions { - private HashMap rockets = new HashMap(); - - private HashMap fire = new HashMap(); - - @Pure - public Map getRockets() { - return Collections.unmodifiableMap(this.rockets); - } - - @Pure - public Map getFire() { - return Collections.unmodifiableMap(this.fire); - } - - public RocketsPos setRocketPosition(final UUID id, final Vector position) { - RocketsPos _xblockexpression = null; - { - RocketsPos pos = new RocketsPos(); - pos.setPosition(position); - RocketsPos _xifexpression = null; - boolean _containsKey = this.rockets.containsKey(id); - if (_containsKey) { - RocketsPos _xblockexpression_1 = null; - { - pos.setColor(this.rockets.get(id).getColor()); - _xblockexpression_1 = this.rockets.replace(id, pos); - } - _xifexpression = _xblockexpression_1; - } else { - RocketsPos _xblockexpression_2 = null; - { - pos.setColor(Color.color(Math.random(), Math.random(), Math.random())); - _xblockexpression_2 = this.rockets.put(id, pos); - } - _xifexpression = _xblockexpression_2; - } - _xblockexpression = _xifexpression; - } - return _xblockexpression; - } - - public RocketsPos removeRocketPosition(final UUID id) { - return this.rockets.remove(id); - } - - public boolean hideHocketPosition(final UUID id) { - return this.rockets.get(id).setHidden(true); - } - - public FirePos setFirePosition(final UUID id, final UUID rocketID, final List> positions) { - FirePos _xblockexpression = null; - { - FirePos pos = new FirePos(); - pos.setPositions(positions); - FirePos _xifexpression = null; - boolean _containsKey = this.fire.containsKey(id); - if (_containsKey) { - FirePos _xblockexpression_1 = null; - { - pos.setColor(this.fire.get(id).getColor()); - _xblockexpression_1 = this.fire.replace(id, pos); - } - _xifexpression = _xblockexpression_1; - } else { - FirePos _xblockexpression_2 = null; - { - boolean _containsKey_1 = this.rockets.containsKey(rocketID); - if (_containsKey_1) { - pos.setColor(this.rockets.get(rocketID).getColor()); - } else { - pos.setColor(Color.color(Math.random(), Math.random(), Math.random())); - } - _xblockexpression_2 = this.fire.put(id, pos); - } - _xifexpression = _xblockexpression_2; - } - _xblockexpression = _xifexpression; - } - return _xblockexpression; - } - - public FirePos removeFirePosition(final UUID id) { - return this.fire.remove(id); - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Positions other = (Positions) obj; - if (this.rockets == null) { - if (other.rockets != null) - return false; - } else if (!this.rockets.equals(other.rockets)) - return false; - if (this.fire == null) { - if (other.fire != null) - return false; - } else if (!this.fire.equals(other.fire)) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((this.rockets== null) ? 0 : this.rockets.hashCode()); - result = prime * result + ((this.fire== null) ? 0 : this.fire.hashCode()); - return result; - } - - @SyntheticMember - public Positions() { - super(); - } -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Rocket.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Rocket.java deleted file mode 100644 index 772dec3..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/Rocket.java +++ /dev/null @@ -1,511 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.core.AgentTask; -import io.sarl.core.Behaviors; -import io.sarl.core.DefaultContextInteractions; -import io.sarl.core.ExternalContextAccess; -import io.sarl.core.Initialize; -import io.sarl.core.InnerContextAccess; -import io.sarl.core.Lifecycle; -import io.sarl.core.Logging; -import io.sarl.core.MemberJoined; -import io.sarl.core.MemberLeft; -import io.sarl.core.Schedules; -import io.sarl.demos.fireworks.Exit; -import io.sarl.demos.fireworks.Explode; -import io.sarl.demos.fireworks.Fire; -import io.sarl.demos.fireworks.FireReady; -import io.sarl.demos.fireworks.Freeze; -import io.sarl.demos.fireworks.Positions; -import io.sarl.demos.fireworks.UpdateRocketPosition; -import io.sarl.lang.annotation.ImportedCapacityFeature; -import io.sarl.lang.annotation.PerceptGuardEvaluator; -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Agent; -import io.sarl.lang.core.BuiltinCapacitiesProvider; -import io.sarl.lang.core.Skill; -import io.sarl.lang.util.ClearableReference; -import java.util.Collection; -import java.util.List; -import java.util.Random; -import java.util.UUID; -import java.util.Vector; -import javax.inject.Inject; -import org.eclipse.xtext.xbase.lib.Conversions; -import org.eclipse.xtext.xbase.lib.DoubleExtensions; -import org.eclipse.xtext.xbase.lib.Exceptions; -import org.eclipse.xtext.xbase.lib.Extension; -import org.eclipse.xtext.xbase.lib.Inline; -import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class Rocket extends Agent { - private Double x; - - private Double y; - - private Double gravity; - - private Double speedx; - - private Double speedy; - - private Integer fireQuantity; - - private Integer lifetime; - - private boolean frozen = false; - - private boolean exploded = false; - - private boolean exited = false; - - private Positions grid; - - private UUID id; - - private AgentTask move; - - @SyntheticMember - private void $behaviorUnit$Exit$0(final Exit occurrence) { - DefaultContextInteractions _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER = this.$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - Exit _exit = new Exit(); - _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER.emit(_exit); - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.killMe(); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Exit$0(final Exit it, final Exit occurrence) { - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - boolean _hasMemberAgent = _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.hasMemberAgent(); - boolean _not = (!_hasMemberAgent); - return _not; - } - - @SyntheticMember - private void $behaviorUnit$Exit$1(final Exit occurrence) { - this.exploded = true; - this.frozen = true; - this.exited = true; - Schedules _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER = this.$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER.cancel(this.move, true); - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - Exit _exit = new Exit(); - _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext().getDefaultSpace().emit(_exit, null); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Exit$1(final Exit it, final Exit occurrence) { - return (this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS).hasMemberAgent() && (!this.exited)); - } - - @SyntheticMember - private void $behaviorUnit$Freeze$2(final Freeze occurrence) { - this.frozen = occurrence.value; - if (this.frozen) { - Schedules _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER = this.$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER.cancel(this.move, true); - } - if ((!this.frozen)) { - Behaviors _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER = this.$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - UpdateRocketPosition _updateRocketPosition = new UpdateRocketPosition(); - _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER.wake(_updateRocketPosition); - } - } - - @SyntheticMember - private void $behaviorUnit$Initialize$3(final Initialize occurrence) { - Logging _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER = this.$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER.info("New rocket launched"); - Random rnd = new Random(); - boolean _equals = Integer.valueOf(((List)Conversions.doWrapArray(occurrence.parameters)).size()).equals(Integer.valueOf(7)); - if (_equals) { - Object _get = occurrence.parameters[0]; - this.x = ((Double) _get); - Object _get_1 = occurrence.parameters[1]; - this.y = ((Double) _get_1); - Object _get_2 = occurrence.parameters[2]; - this.speedx = ((Double) _get_2); - Object _get_3 = occurrence.parameters[3]; - this.speedy = ((Double) _get_3); - Object _get_4 = occurrence.parameters[4]; - this.gravity = ((Double) _get_4); - Object _get_5 = occurrence.parameters[5]; - this.fireQuantity = ((Integer) _get_5); - Object _get_6 = occurrence.parameters[6]; - this.grid = ((Positions) _get_6); - } else { - Logging _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER_1 = this.$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER_1.info("Error in Fireworks Initialize : bad parameters number"); - } - int _nextInt = rnd.nextInt(5); - int _multiply = (_nextInt * 300); - int _plus = (_multiply + 300); - this.lifetime = Integer.valueOf(_plus); - this.id = UUID.randomUUID(); - Schedules _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER = this.$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - final Procedure1 _function = (Agent it) -> { - try { - Behaviors _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER = this.$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - UpdateRocketPosition _updateRocketPosition = new UpdateRocketPosition(); - _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER.wake(_updateRocketPosition); - } catch (final Throwable _t) { - if (_t instanceof Exception) { - final Exception e = (Exception)_t; - e.printStackTrace(); - } else { - throw Exceptions.sneakyThrow(_t); - } - } - }; - this.move = _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER.atFixedDelay(30, _function); - } - - @SyntheticMember - private void $behaviorUnit$UpdateRocketPosition$4(final UpdateRocketPosition occurrence) { - Vector vect = new Vector(2); - double _plus = DoubleExtensions.operator_plus(this.x, this.speedx); - this.x = Double.valueOf(_plus); - double _plus_1 = DoubleExtensions.operator_plus(this.y, this.speedy); - this.y = Double.valueOf(_plus_1); - vect.clear(); - vect.add(this.x); - vect.add(this.y); - this.lifetime = Integer.valueOf(((this.lifetime).intValue() - 10)); - if ((this.grid != null)) { - this.grid.setRocketPosition(this.id, vect); - } - if (((this.lifetime).intValue() <= 0)) { - this.exploded = true; - Schedules _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER = this.$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - _$CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER.cancel(this.move, true); - this.grid.hideHocketPosition(this.id); - Behaviors _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER = this.$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - Explode _explode = new Explode(); - _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER.wake(_explode); - } - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$UpdateRocketPosition$4(final UpdateRocketPosition it, final UpdateRocketPosition occurrence) { - return ((this.isFromMe(occurrence) && (!this.frozen)) && (!this.exploded)); - } - - @SyntheticMember - private void $behaviorUnit$Explode$5(final Explode occurrence) { - for (int i = 0; (i < (this.fireQuantity).intValue()); i++) { - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.spawnInContext(Fire.class, _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext(), this.x, this.y, this.grid, this.id); - } - } - - @SyntheticMember - private void $behaviorUnit$MemberLeft$6(final MemberLeft occurrence) { - this.exited = true; - this.grid.removeRocketPosition(this.id); - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.killMe(); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$MemberLeft$6(final MemberLeft it, final MemberLeft occurrence) { - return (((!this.isFromMe(occurrence)) && (!this.frozen)) && (!this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS).hasMemberAgent())); - } - - @SyntheticMember - private void $behaviorUnit$MemberJoined$7(final MemberJoined occurrence) { - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - FireReady _fireReady = new FireReady(); - _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext().getDefaultSpace().emit(_fireReady, null); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$MemberJoined$7(final MemberJoined it, final MemberJoined occurrence) { - return (((!this.isFromMe(occurrence)) && this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS).hasMemberAgent()) && (this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS).getMemberAgentCount() == (this.fireQuantity).intValue())); - } - - @Extension - @ImportedCapacityFeature(Lifecycle.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_LIFECYCLE; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE)", imported = Lifecycle.class) - private Lifecycle $CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class); - } - return $castSkill(Lifecycle.class, this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - } - - @Extension - @ImportedCapacityFeature(Logging.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_LOGGING; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING)", imported = Logging.class) - private Logging $CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class); - } - return $castSkill(Logging.class, this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - } - - @Extension - @ImportedCapacityFeature(Schedules.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_SCHEDULES; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Schedules.class, (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class)) : this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES)", imported = Schedules.class) - private Schedules $CAPACITY_USE$IO_SARL_CORE_SCHEDULES$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES == null || this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES = $getSkill(Schedules.class); - } - return $castSkill(Schedules.class, this.$CAPACITY_USE$IO_SARL_CORE_SCHEDULES); - } - - @Extension - @ImportedCapacityFeature(Behaviors.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_BEHAVIORS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS)", imported = Behaviors.class) - private Behaviors $CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class); - } - return $castSkill(Behaviors.class, this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - } - - @Extension - @ImportedCapacityFeature(DefaultContextInteractions.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS)", imported = DefaultContextInteractions.class) - private DefaultContextInteractions $CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class); - } - return $castSkill(DefaultContextInteractions.class, this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - } - - @Extension - @ImportedCapacityFeature(InnerContextAccess.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS)", imported = InnerContextAccess.class) - private InnerContextAccess $CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class); - } - return $castSkill(InnerContextAccess.class, this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - } - - @Extension - @ImportedCapacityFeature(ExternalContextAccess.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(ExternalContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS = $getSkill(ExternalContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS)", imported = ExternalContextAccess.class) - private ExternalContextAccess $CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS = $getSkill(ExternalContextAccess.class); - } - return $castSkill(ExternalContextAccess.class, this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Initialize(final Initialize occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Initialize$3(occurrence)); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$UpdateRocketPosition(final UpdateRocketPosition occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$UpdateRocketPosition$4(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$UpdateRocketPosition$4(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Freeze(final Freeze occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Freeze$2(occurrence)); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$MemberLeft(final MemberLeft occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$MemberLeft$6(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$MemberLeft$6(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Explode(final Explode occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Explode$5(occurrence)); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Exit(final Exit occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$Exit$0(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Exit$0(occurrence)); - } - if ($behaviorUnitGuard$Exit$1(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Exit$1(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$MemberJoined(final MemberJoined occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$MemberJoined$7(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$MemberJoined$7(occurrence)); - } - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Rocket other = (Rocket) obj; - if (this.x == null) { - if (other.x != null) - return false; - } else if (!this.x.equals(other.x)) - return false; - if (this.y == null) { - if (other.y != null) - return false; - } else if (!this.y.equals(other.y)) - return false; - if (this.gravity == null) { - if (other.gravity != null) - return false; - } else if (!this.gravity.equals(other.gravity)) - return false; - if (this.speedx == null) { - if (other.speedx != null) - return false; - } else if (!this.speedx.equals(other.speedx)) - return false; - if (this.speedy == null) { - if (other.speedy != null) - return false; - } else if (!this.speedy.equals(other.speedy)) - return false; - if (this.fireQuantity == null) { - if (other.fireQuantity != null) - return false; - } else if (!this.fireQuantity.equals(other.fireQuantity)) - return false; - if (this.lifetime == null) { - if (other.lifetime != null) - return false; - } else if (!this.lifetime.equals(other.lifetime)) - return false; - if (other.frozen != this.frozen) - return false; - if (other.exploded != this.exploded) - return false; - if (other.exited != this.exited) - return false; - if (this.grid == null) { - if (other.grid != null) - return false; - } else if (!this.grid.equals(other.grid)) - return false; - if (this.id == null) { - if (other.id != null) - return false; - } else if (!this.id.equals(other.id)) - return false; - if (this.move == null) { - if (other.move != null) - return false; - } else if (!this.move.equals(other.move)) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((this.x== null) ? 0 : this.x.hashCode()); - result = prime * result + ((this.y== null) ? 0 : this.y.hashCode()); - result = prime * result + ((this.gravity== null) ? 0 : this.gravity.hashCode()); - result = prime * result + ((this.speedx== null) ? 0 : this.speedx.hashCode()); - result = prime * result + ((this.speedy== null) ? 0 : this.speedy.hashCode()); - result = prime * result + ((this.fireQuantity== null) ? 0 : this.fireQuantity.hashCode()); - result = prime * result + ((this.lifetime== null) ? 0 : this.lifetime.hashCode()); - result = prime * result + (this.frozen ? 1231 : 1237); - result = prime * result + (this.exploded ? 1231 : 1237); - result = prime * result + (this.exited ? 1231 : 1237); - result = prime * result + ((this.grid== null) ? 0 : this.grid.hashCode()); - result = prime * result + ((this.id== null) ? 0 : this.id.hashCode()); - result = prime * result + ((this.move== null) ? 0 : this.move.hashCode()); - return result; - } - - @SyntheticMember - public Rocket(final UUID parentID, final UUID agentID) { - super(parentID, agentID); - } - - @SyntheticMember - @Inject - public Rocket(final BuiltinCapacitiesProvider provider, final UUID parentID, final UUID agentID) { - super(provider, parentID, agentID); - } -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketLauncher.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketLauncher.java deleted file mode 100644 index e52d13d..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketLauncher.java +++ /dev/null @@ -1,375 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.core.Behaviors; -import io.sarl.core.DefaultContextInteractions; -import io.sarl.core.ExternalContextAccess; -import io.sarl.core.Initialize; -import io.sarl.core.InnerContextAccess; -import io.sarl.core.Lifecycle; -import io.sarl.core.Logging; -import io.sarl.core.MemberLeft; -import io.sarl.demos.fireworks.Exit; -import io.sarl.demos.fireworks.Freeze; -import io.sarl.demos.fireworks.Launch; -import io.sarl.demos.fireworks.Positions; -import io.sarl.demos.fireworks.Rocket; -import io.sarl.demos.fireworks.RocketReady; -import io.sarl.lang.annotation.ImportedCapacityFeature; -import io.sarl.lang.annotation.PerceptGuardEvaluator; -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Agent; -import io.sarl.lang.core.BuiltinCapacitiesProvider; -import io.sarl.lang.core.Skill; -import io.sarl.lang.util.ClearableReference; -import java.util.Collection; -import java.util.List; -import java.util.UUID; -import javax.inject.Inject; -import org.eclipse.xtext.xbase.lib.Conversions; -import org.eclipse.xtext.xbase.lib.Extension; -import org.eclipse.xtext.xbase.lib.Inline; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class RocketLauncher extends Agent { - private Double x; - - private Double y; - - private Integer fireQuantity; - - private Double gravity; - - private Positions grid; - - private boolean exited = false; - - @SyntheticMember - private void $behaviorUnit$Exit$0(final Exit occurrence) { - DefaultContextInteractions _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER = this.$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - Exit _exit = new Exit(); - _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER.emit(_exit); - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.killMe(); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Exit$0(final Exit it, final Exit occurrence) { - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - boolean _hasMemberAgent = _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.hasMemberAgent(); - boolean _not = (!_hasMemberAgent); - return _not; - } - - @SyntheticMember - private void $behaviorUnit$Exit$1(final Exit occurrence) { - this.exited = true; - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - Exit _exit = new Exit(); - _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext().getDefaultSpace().emit(_exit, null); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Exit$1(final Exit it, final Exit occurrence) { - return (this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS).hasMemberAgent() && (!this.exited)); - } - - @SyntheticMember - private void $behaviorUnit$Initialize$2(final Initialize occurrence) { - Object _get = occurrence.parameters[0]; - this.x = ((Double) _get); - Object _get_1 = occurrence.parameters[1]; - this.y = ((Double) _get_1); - Object _get_2 = occurrence.parameters[2]; - this.fireQuantity = ((Integer) _get_2); - Object _get_3 = occurrence.parameters[3]; - this.gravity = ((Double) _get_3); - Object _get_4 = occurrence.parameters[4]; - this.grid = ((Positions) _get_4); - Logging _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER = this.$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER.info("New rocket launcher created"); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Initialize$2(final Initialize it, final Initialize occurrence) { - boolean _isEmpty = ((List)Conversions.doWrapArray(occurrence.parameters)).isEmpty(); - boolean _not = (!_isEmpty); - return _not; - } - - @SyntheticMember - private void $behaviorUnit$Initialize$3(final Initialize occurrence) { - this.x = Double.valueOf(0.0); - this.y = Double.valueOf(0.0); - this.fireQuantity = Integer.valueOf(30); - this.gravity = Double.valueOf(0.5); - this.grid = null; - Logging _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER = this.$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - _$CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER.info("New rocket launcher created"); - DefaultContextInteractions _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER = this.$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - RocketReady _rocketReady = new RocketReady(); - _$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER.emit(_rocketReady); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Initialize$3(final Initialize it, final Initialize occurrence) { - boolean _isEmpty = ((List)Conversions.doWrapArray(occurrence.parameters)).isEmpty(); - return _isEmpty; - } - - @SyntheticMember - private void $behaviorUnit$Launch$4(final Launch occurrence) { - double _random = Math.random(); - double vx = (_random * 2.0); - double _random_1 = Math.random(); - double _multiply = (_random_1 * 5.5); - double vy = (_multiply + 2.0); - Lifecycle _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER = this.$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - _$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER.spawnInContext(Rocket.class, _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext(), this.x, this.y, Double.valueOf(vx), Double.valueOf(vy), this.gravity, this.fireQuantity, this.grid); - } - - @SyntheticMember - private void $behaviorUnit$Freeze$5(final Freeze occurrence) { - InnerContextAccess _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER = this.$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - _$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER.getInnerContext().getDefaultSpace().emit(occurrence, null); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$Freeze$5(final Freeze it, final Freeze occurrence) { - boolean _isFromMe = this.isFromMe(occurrence); - boolean _not = (!_isFromMe); - return _not; - } - - @SyntheticMember - private void $behaviorUnit$MemberLeft$6(final MemberLeft occurrence) { - Behaviors _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER = this.$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - Launch _launch = new Launch(); - _$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER.wake(_launch); - } - - @SyntheticMember - @Pure - private boolean $behaviorUnitGuard$MemberLeft$6(final MemberLeft it, final MemberLeft occurrence) { - return ((!this.isFromMe(occurrence)) && (!this.exited)); - } - - @Extension - @ImportedCapacityFeature(Logging.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_LOGGING; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Logging.class, (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LOGGING)", imported = Logging.class) - private Logging $CAPACITY_USE$IO_SARL_CORE_LOGGING$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_LOGGING == null || this.$CAPACITY_USE$IO_SARL_CORE_LOGGING.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_LOGGING = $getSkill(Logging.class); - } - return $castSkill(Logging.class, this.$CAPACITY_USE$IO_SARL_CORE_LOGGING); - } - - @Extension - @ImportedCapacityFeature(Behaviors.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_BEHAVIORS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Behaviors.class, (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class)) : this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS)", imported = Behaviors.class) - private Behaviors $CAPACITY_USE$IO_SARL_CORE_BEHAVIORS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS == null || this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS = $getSkill(Behaviors.class); - } - return $castSkill(Behaviors.class, this.$CAPACITY_USE$IO_SARL_CORE_BEHAVIORS); - } - - @Extension - @ImportedCapacityFeature(DefaultContextInteractions.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(DefaultContextInteractions.class, (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class)) : this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS)", imported = DefaultContextInteractions.class) - private DefaultContextInteractions $CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS == null || this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS = $getSkill(DefaultContextInteractions.class); - } - return $castSkill(DefaultContextInteractions.class, this.$CAPACITY_USE$IO_SARL_CORE_DEFAULTCONTEXTINTERACTIONS); - } - - @Extension - @ImportedCapacityFeature(InnerContextAccess.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(InnerContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS)", imported = InnerContextAccess.class) - private InnerContextAccess $CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS = $getSkill(InnerContextAccess.class); - } - return $castSkill(InnerContextAccess.class, this.$CAPACITY_USE$IO_SARL_CORE_INNERCONTEXTACCESS); - } - - @Extension - @ImportedCapacityFeature(Lifecycle.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_LIFECYCLE; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(Lifecycle.class, (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class)) : this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE)", imported = Lifecycle.class) - private Lifecycle $CAPACITY_USE$IO_SARL_CORE_LIFECYCLE$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE == null || this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE = $getSkill(Lifecycle.class); - } - return $castSkill(Lifecycle.class, this.$CAPACITY_USE$IO_SARL_CORE_LIFECYCLE); - } - - @Extension - @ImportedCapacityFeature(ExternalContextAccess.class) - @SyntheticMember - private transient ClearableReference $CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS; - - @SyntheticMember - @Pure - @Inline(value = "$castSkill(ExternalContextAccess.class, (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS.get() == null) ? (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS = $getSkill(ExternalContextAccess.class)) : this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS)", imported = ExternalContextAccess.class) - private ExternalContextAccess $CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS$CALLER() { - if (this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS == null || this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS.get() == null) { - this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS = $getSkill(ExternalContextAccess.class); - } - return $castSkill(ExternalContextAccess.class, this.$CAPACITY_USE$IO_SARL_CORE_EXTERNALCONTEXTACCESS); - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Initialize(final Initialize occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$Initialize$2(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Initialize$2(occurrence)); - } - if ($behaviorUnitGuard$Initialize$3(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Initialize$3(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Freeze(final Freeze occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$Freeze$5(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Freeze$5(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Exit(final Exit occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$Exit$0(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Exit$0(occurrence)); - } - if ($behaviorUnitGuard$Exit$1(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Exit$1(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$MemberLeft(final MemberLeft occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - if ($behaviorUnitGuard$MemberLeft$6(occurrence, occurrence)) { - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$MemberLeft$6(occurrence)); - } - } - - @SyntheticMember - @PerceptGuardEvaluator - private void $guardEvaluator$Launch(final Launch occurrence, final Collection ___SARLlocal_runnableCollection) { - assert occurrence != null; - assert ___SARLlocal_runnableCollection != null; - ___SARLlocal_runnableCollection.add(() -> $behaviorUnit$Launch$4(occurrence)); - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - RocketLauncher other = (RocketLauncher) obj; - if (this.x == null) { - if (other.x != null) - return false; - } else if (!this.x.equals(other.x)) - return false; - if (this.y == null) { - if (other.y != null) - return false; - } else if (!this.y.equals(other.y)) - return false; - if (this.fireQuantity == null) { - if (other.fireQuantity != null) - return false; - } else if (!this.fireQuantity.equals(other.fireQuantity)) - return false; - if (this.gravity == null) { - if (other.gravity != null) - return false; - } else if (!this.gravity.equals(other.gravity)) - return false; - if (this.grid == null) { - if (other.grid != null) - return false; - } else if (!this.grid.equals(other.grid)) - return false; - if (other.exited != this.exited) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((this.x== null) ? 0 : this.x.hashCode()); - result = prime * result + ((this.y== null) ? 0 : this.y.hashCode()); - result = prime * result + ((this.fireQuantity== null) ? 0 : this.fireQuantity.hashCode()); - result = prime * result + ((this.gravity== null) ? 0 : this.gravity.hashCode()); - result = prime * result + ((this.grid== null) ? 0 : this.grid.hashCode()); - result = prime * result + (this.exited ? 1231 : 1237); - return result; - } - - @SyntheticMember - public RocketLauncher(final UUID parentID, final UUID agentID) { - super(parentID, agentID); - } - - @SyntheticMember - @Inject - public RocketLauncher(final BuiltinCapacitiesProvider provider, final UUID parentID, final UUID agentID) { - super(provider, parentID, agentID); - } -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketReady.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketReady.java deleted file mode 100644 index 871783f..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketReady.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class RocketReady extends Event { - @SyntheticMember - public RocketReady() { - super(); - } - - @SyntheticMember - public RocketReady(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketsPos.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketsPos.java deleted file mode 100644 index b3bab60..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/RocketsPos.java +++ /dev/null @@ -1,92 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import java.util.Vector; -import javafx.scene.paint.Color; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class RocketsPos { - public final int ROCKETREFRESHDELAY = 100; - - private Vector position = new Vector(); - - private Color color; - - private boolean hidden = false; - - @Pure - public Vector getPosition() { - return this.position; - } - - public Vector setPosition(final Vector position) { - return this.position = position; - } - - @Pure - public Color getColor() { - return this.color; - } - - public Color setColor(final Color color) { - return this.color = color; - } - - public boolean setHidden(final boolean hidden) { - return this.hidden = hidden; - } - - @Pure - public boolean getHidden() { - return this.hidden; - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - RocketsPos other = (RocketsPos) obj; - if (other.ROCKETREFRESHDELAY != this.ROCKETREFRESHDELAY) - return false; - if (this.position == null) { - if (other.position != null) - return false; - } else if (!this.position.equals(other.position)) - return false; - if (this.color == null) { - if (other.color != null) - return false; - } else if (!this.color.equals(other.color)) - return false; - if (other.hidden != this.hidden) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + this.ROCKETREFRESHDELAY; - result = prime * result + ((this.position== null) ? 0 : this.position.hashCode()); - result = prime * result + ((this.color== null) ? 0 : this.color.hashCode()); - result = prime * result + (this.hidden ? 1231 : 1237); - return result; - } - - @SyntheticMember - public RocketsPos() { - super(); - } -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/SetupSettings.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/SetupSettings.java deleted file mode 100644 index 2ae8673..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/SetupSettings.java +++ /dev/null @@ -1,89 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Event; -import org.eclipse.xtext.xbase.lib.Pure; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class SetupSettings extends Event { - public Integer rocketsQuantity; - - public Integer fireQuatity; - - public Double gravity; - - public Double maxWidth; - - public SetupSettings(final Integer rq, final Integer fq, final Double grav, final Double max) { - this.rocketsQuantity = rq; - this.fireQuatity = fq; - this.gravity = grav; - this.maxWidth = max; - } - - @Override - @Pure - @SyntheticMember - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - SetupSettings other = (SetupSettings) obj; - if (this.rocketsQuantity == null) { - if (other.rocketsQuantity != null) - return false; - } else if (!this.rocketsQuantity.equals(other.rocketsQuantity)) - return false; - if (this.fireQuatity == null) { - if (other.fireQuatity != null) - return false; - } else if (!this.fireQuatity.equals(other.fireQuatity)) - return false; - if (this.gravity == null) { - if (other.gravity != null) - return false; - } else if (!this.gravity.equals(other.gravity)) - return false; - if (this.maxWidth == null) { - if (other.maxWidth != null) - return false; - } else if (!this.maxWidth.equals(other.maxWidth)) - return false; - return super.equals(obj); - } - - @Override - @Pure - @SyntheticMember - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((this.rocketsQuantity== null) ? 0 : this.rocketsQuantity.hashCode()); - result = prime * result + ((this.fireQuatity== null) ? 0 : this.fireQuatity.hashCode()); - result = prime * result + ((this.gravity== null) ? 0 : this.gravity.hashCode()); - result = prime * result + ((this.maxWidth== null) ? 0 : this.maxWidth.hashCode()); - return result; - } - - /** - * Returns a String representation of the SetupSettings event's attributes only. - */ - @SyntheticMember - @Pure - protected String attributesToString() { - StringBuilder result = new StringBuilder(super.attributesToString()); - result.append("rocketsQuantity = ").append(this.rocketsQuantity); - result.append("fireQuatity = ").append(this.fireQuatity); - result.append("gravity = ").append(this.gravity); - result.append("maxWidth = ").append(this.maxWidth); - return result.toString(); - } - - @SyntheticMember - private final static long serialVersionUID = 354887804L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/SprayFire.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/SprayFire.java deleted file mode 100644 index 3944055..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/SprayFire.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class SprayFire extends Event { - @SyntheticMember - public SprayFire() { - super(); - } - - @SyntheticMember - public SprayFire(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/UpdateFirePosition.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/UpdateFirePosition.java deleted file mode 100644 index 1a9e690..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/UpdateFirePosition.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class UpdateFirePosition extends Event { - @SyntheticMember - public UpdateFirePosition() { - super(); - } - - @SyntheticMember - public UpdateFirePosition(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -} diff --git a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/UpdateRocketPosition.java b/src/main/generated-sources/sarl/io/sarl/demos/fireworks/UpdateRocketPosition.java deleted file mode 100644 index 4dd249c..0000000 --- a/src/main/generated-sources/sarl/io/sarl/demos/fireworks/UpdateRocketPosition.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.sarl.demos.fireworks; - -import io.sarl.lang.annotation.SarlSpecification; -import io.sarl.lang.annotation.SyntheticMember; -import io.sarl.lang.core.Address; -import io.sarl.lang.core.Event; - -@SarlSpecification("0.5") -@SuppressWarnings("all") -public class UpdateRocketPosition extends Event { - @SyntheticMember - public UpdateRocketPosition() { - super(); - } - - @SyntheticMember - public UpdateRocketPosition(final Address source) { - super(source); - } - - @SyntheticMember - private final static long serialVersionUID = 588368462L; -}