Commit 11fc3b10 authored by Depasse Arthur's avatar Depasse Arthur

Merge branch 'master' of gitlab.centralesupelec.fr:depasse_art/Projet-Long-9

parents 38d32895 b6fa01d4
......@@ -7,7 +7,6 @@
<nodeMappings name="StateNode" semanticCandidatesExpression="feature:ownedStates" synchronizationLock="true" domainClass="fsm::State">
<style xsi:type="style:BundledImageDescription" labelSize="12" showIcon="false" labelPosition="node" resizeKind="NSEW">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelFormat>italic</labelFormat>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_yellow']"/>
</style>
......@@ -21,15 +20,15 @@
</style>
</edgeMappings>
<containerMappings name="StateContainer" label="State Container" semanticCandidatesExpression="feature:ownedStates" synchronizationLock="true" domainClass="fsm::State" childrenPresentation="VerticalStack">
<subContainerMappings name="OnEntererdActionsContainer" label="On Entered Actions Container" semanticCandidatesExpression="var:self" synchronizationLock="true" domainClass="fsm::Action" childrenPresentation="List">
<subNodeMappings name="OnEnteredActionNode" label="On Entered Action Node" semanticCandidatesExpression="feature::onEnteredActions" synchronizationLock="true" domainClass="fsm::Action">
<style xsi:type="style:SquareDescription" labelPosition="node" resizeKind="NSEW">
<subContainerMappings name="OnEntererdActionsContainer" label="On Entered Actions Container" semanticCandidatesExpression="var:self" synchronizationLock="true" domainClass="fsm::State" childrenPresentation="List">
<subNodeMappings name="OnEnteredActionNode" label="On Entered Action Node" semanticCandidatesExpression="feature:onEnteredActions" synchronizationLock="true" domainClass="fsm::Action">
<style xsi:type="style:SquareDescription" iconPath="\fr.supelec.plong9.fsm.edit\icons\full\obj16\Action.gif" labelPosition="node" resizeKind="NSEW">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
</style>
</subNodeMappings>
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelExpression="On Entered Actions">
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" showIcon="false" labelExpression="On Entered Actions">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
......@@ -37,21 +36,21 @@
</style>
</subContainerMappings>
<subContainerMappings name="OnExitedActionsContainer" label="On Exited Actions Container" semanticCandidatesExpression="var:self" domainClass="fsm::State" childrenPresentation="List">
<subNodeMappings name="OnExitedActionNode" label="On Exited Action Node" synchronizationLock="true">
<style xsi:type="style:SquareDescription" labelPosition="node" resizeKind="NSEW">
<subNodeMappings name="OnExitedActionNode" label="On Exited Action Node" semanticCandidatesExpression="feature:onExitedActions" synchronizationLock="true" domainClass="fsm::Action">
<style xsi:type="style:SquareDescription" iconPath="\fr.supelec.plong9.fsm.edit\icons\full\obj16\Action.gif" labelPosition="node" resizeKind="NSEW">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
</style>
</subNodeMappings>
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelExpression="On Exited Actions">
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" showIcon="false" labelExpression="On Exited Actions">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
<foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_gray']"/>
</style>
</subContainerMappings>
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" roundedCorner="true">
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" showIcon="false" roundedCorner="true">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
......
......@@ -758,7 +758,7 @@
</ownedStyle>
<actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_zPQc4G2xEemjJLy0_4_Kjg" name="[0..1] onEnteredActions" sourceNode="_7IzxAC8REemUD62u2ND_rQ" targetNode="_HF-6EEQNEemrwoRpiiTFJA">
<ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_zPQc4G2xEemjJLy0_4_Kjg" name="[0..*] onEnteredActions" sourceNode="_7IzxAC8REemUD62u2ND_rQ" targetNode="_HF-6EEQNEemrwoRpiiTFJA">
<target xmi:type="ecore:EReference" href="fsm.ecore#//State/onEnteredActions"/>
<semanticElements xmi:type="ecore:EReference" href="fsm.ecore#//State/onEnteredActions"/>
<ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_zqOE4HWkEemLj80b9HKNdQ" routingStyle="manhattan" strokeColor="0,0,0">
......@@ -768,7 +768,7 @@
</ownedStyle>
<actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5X7rUG2xEemjJLy0_4_Kjg" name="[0..1] onExitedActions" sourceNode="_7IzxAC8REemUD62u2ND_rQ" targetNode="_HF-6EEQNEemrwoRpiiTFJA">
<ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5X7rUG2xEemjJLy0_4_Kjg" name="[0..*] onExitedActions" sourceNode="_7IzxAC8REemUD62u2ND_rQ" targetNode="_HF-6EEQNEemrwoRpiiTFJA">
<target xmi:type="ecore:EReference" href="fsm.ecore#//State/onExitedActions"/>
<semanticElements xmi:type="ecore:EReference" href="fsm.ecore#//State/onExitedActions"/>
<ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_zqPTAHWkEemLj80b9HKNdQ" routingStyle="manhattan" strokeColor="0,0,0">
......
......@@ -32,8 +32,10 @@
eType="#//Transition" containment="true" eOpposite="#//Transition/source"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" upperBound="-1"
eType="#//Transition" eOpposite="#//Transition/target"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="onEnteredActions" eType="#//Action"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="onExitedActions" eType="#//Action"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="onEnteredActions" upperBound="-1"
eType="#//Action"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="onExitedActions" upperBound="-1"
eType="#//Action"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="expectedMessage" eType="#//Message"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Transition">
......
......@@ -239,7 +239,7 @@ public interface FsmPackage extends EPackage {
int STATE__INCOMING_TRANSITIONS = 3;
/**
* The feature id for the '<em><b>On Entered Actions</b></em>' reference.
* The feature id for the '<em><b>On Entered Actions</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
......@@ -248,7 +248,7 @@ public interface FsmPackage extends EPackage {
int STATE__ON_ENTERED_ACTIONS = 4;
/**
* The feature id for the '<em><b>On Exited Actions</b></em>' reference.
* The feature id for the '<em><b>On Exited Actions</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
......@@ -774,10 +774,10 @@ public interface FsmPackage extends EPackage {
EReference getState_IncomingTransitions();
/**
* Returns the meta object for the reference '{@link fr.supelec.plong9.fsm.State#getOnEnteredActions <em>On Entered Actions</em>}'.
* Returns the meta object for the reference list '{@link fr.supelec.plong9.fsm.State#getOnEnteredActions <em>On Entered Actions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>On Entered Actions</em>'.
* @return the meta object for the reference list '<em>On Entered Actions</em>'.
* @see fr.supelec.plong9.fsm.State#getOnEnteredActions()
* @see #getState()
* @generated
......@@ -785,10 +785,10 @@ public interface FsmPackage extends EPackage {
EReference getState_OnEnteredActions();
/**
* Returns the meta object for the reference '{@link fr.supelec.plong9.fsm.State#getOnExitedActions <em>On Exited Actions</em>}'.
* Returns the meta object for the reference list '{@link fr.supelec.plong9.fsm.State#getOnExitedActions <em>On Exited Actions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>On Exited Actions</em>'.
* @return the meta object for the reference list '<em>On Exited Actions</em>'.
* @see fr.supelec.plong9.fsm.State#getOnExitedActions()
* @see #getState()
* @generated
......@@ -1194,7 +1194,7 @@ public interface FsmPackage extends EPackage {
EReference STATE__INCOMING_TRANSITIONS = eINSTANCE.getState_IncomingTransitions();
/**
* The meta object literal for the '<em><b>On Entered Actions</b></em>' reference feature.
* The meta object literal for the '<em><b>On Entered Actions</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
......@@ -1202,7 +1202,7 @@ public interface FsmPackage extends EPackage {
EReference STATE__ON_ENTERED_ACTIONS = eINSTANCE.getState_OnEnteredActions();
/**
* The meta object literal for the '<em><b>On Exited Actions</b></em>' reference feature.
* The meta object literal for the '<em><b>On Exited Actions</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
......
......@@ -120,56 +120,36 @@ public interface State extends EObject {
EList<Transition> getIncomingTransitions();
/**
* Returns the value of the '<em><b>On Entered Actions</b></em>' reference.
* Returns the value of the '<em><b>On Entered Actions</b></em>' reference list.
* The list contents are of type {@link fr.supelec.plong9.fsm.Action}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>On Entered Actions</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>On Entered Actions</em>' reference.
* @see #setOnEnteredActions(Action)
* @return the value of the '<em>On Entered Actions</em>' reference list.
* @see fr.supelec.plong9.fsm.FsmPackage#getState_OnEnteredActions()
* @model
* @generated
*/
Action getOnEnteredActions();
EList<Action> getOnEnteredActions();
/**
* Sets the value of the '{@link fr.supelec.plong9.fsm.State#getOnEnteredActions <em>On Entered Actions</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>On Entered Actions</em>' reference.
* @see #getOnEnteredActions()
* @generated
*/
void setOnEnteredActions(Action value);
/**
* Returns the value of the '<em><b>On Exited Actions</b></em>' reference.
* Returns the value of the '<em><b>On Exited Actions</b></em>' reference list.
* The list contents are of type {@link fr.supelec.plong9.fsm.Action}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>On Exited Actions</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>On Exited Actions</em>' reference.
* @see #setOnExitedActions(Action)
* @return the value of the '<em>On Exited Actions</em>' reference list.
* @see fr.supelec.plong9.fsm.FsmPackage#getState_OnExitedActions()
* @model
* @generated
*/
Action getOnExitedActions();
/**
* Sets the value of the '{@link fr.supelec.plong9.fsm.State#getOnExitedActions <em>On Exited Actions</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>On Exited Actions</em>' reference.
* @see #getOnExitedActions()
* @generated
*/
void setOnExitedActions(Action value);
EList<Action> getOnExitedActions();
/**
* Returns the value of the '<em><b>Expected Message</b></em>' reference.
......
......@@ -676,10 +676,10 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
initEReference(getState_IncomingTransitions(), this.getTransition(), this.getTransition_Target(),
"incomingTransitions", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
!IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getState_OnEnteredActions(), this.getAction(), null, "onEnteredActions", null, 0, 1, State.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getState_OnExitedActions(), this.getAction(), null, "onExitedActions", null, 0, 1, State.class,
initEReference(getState_OnEnteredActions(), this.getAction(), null, "onEnteredActions", null, 0, -1,
State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getState_OnExitedActions(), this.getAction(), null, "onExitedActions", null, 0, -1, State.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getState_ExpectedMessage(), this.getMessage(), null, "expectedMessage", null, 0, 1, State.class,
......
......@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.InternalEList;
......@@ -88,24 +89,24 @@ public class StateImpl extends MinimalEObjectImpl.Container implements State {
protected EList<Transition> incomingTransitions;
/**
* The cached value of the '{@link #getOnEnteredActions() <em>On Entered Actions</em>}' reference.
* The cached value of the '{@link #getOnEnteredActions() <em>On Entered Actions</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOnEnteredActions()
* @generated
* @ordered
*/
protected Action onEnteredActions;
protected EList<Action> onEnteredActions;
/**
* The cached value of the '{@link #getOnExitedActions() <em>On Exited Actions</em>}' reference.
* The cached value of the '{@link #getOnExitedActions() <em>On Exited Actions</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOnExitedActions()
* @generated
* @ordered
*/
protected Action onExitedActions;
protected EList<Action> onExitedActions;
/**
* The cached value of the '{@link #getExpectedMessage() <em>Expected Message</em>}' reference.
......@@ -233,15 +234,10 @@ public class StateImpl extends MinimalEObjectImpl.Container implements State {
* <!-- end-user-doc -->
* @generated
*/
public Action getOnEnteredActions() {
if (onEnteredActions != null && onEnteredActions.eIsProxy()) {
InternalEObject oldOnEnteredActions = (InternalEObject) onEnteredActions;
onEnteredActions = (Action) eResolveProxy(oldOnEnteredActions);
if (onEnteredActions != oldOnEnteredActions) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmPackage.STATE__ON_ENTERED_ACTIONS,
oldOnEnteredActions, onEnteredActions));
}
public EList<Action> getOnEnteredActions() {
if (onEnteredActions == null) {
onEnteredActions = new EObjectResolvingEList<Action>(Action.class, this,
FsmPackage.STATE__ON_ENTERED_ACTIONS);
}
return onEnteredActions;
}
......@@ -251,63 +247,14 @@ public class StateImpl extends MinimalEObjectImpl.Container implements State {
* <!-- end-user-doc -->
* @generated
*/
public Action basicGetOnEnteredActions() {
return onEnteredActions;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOnEnteredActions(Action newOnEnteredActions) {
Action oldOnEnteredActions = onEnteredActions;
onEnteredActions = newOnEnteredActions;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsmPackage.STATE__ON_ENTERED_ACTIONS,
oldOnEnteredActions, onEnteredActions));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Action getOnExitedActions() {
if (onExitedActions != null && onExitedActions.eIsProxy()) {
InternalEObject oldOnExitedActions = (InternalEObject) onExitedActions;
onExitedActions = (Action) eResolveProxy(oldOnExitedActions);
if (onExitedActions != oldOnExitedActions) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmPackage.STATE__ON_EXITED_ACTIONS,
oldOnExitedActions, onExitedActions));
}
public EList<Action> getOnExitedActions() {
if (onExitedActions == null) {
onExitedActions = new EObjectResolvingEList<Action>(Action.class, this,
FsmPackage.STATE__ON_EXITED_ACTIONS);
}
return onExitedActions;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Action basicGetOnExitedActions() {
return onExitedActions;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOnExitedActions(Action newOnExitedActions) {
Action oldOnExitedActions = onExitedActions;
onExitedActions = newOnExitedActions;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsmPackage.STATE__ON_EXITED_ACTIONS,
oldOnExitedActions, onExitedActions));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -420,13 +367,9 @@ public class StateImpl extends MinimalEObjectImpl.Container implements State {
case FsmPackage.STATE__INCOMING_TRANSITIONS:
return getIncomingTransitions();
case FsmPackage.STATE__ON_ENTERED_ACTIONS:
if (resolve)
return getOnEnteredActions();
return basicGetOnEnteredActions();
return getOnEnteredActions();
case FsmPackage.STATE__ON_EXITED_ACTIONS:
if (resolve)
return getOnExitedActions();
return basicGetOnExitedActions();
return getOnExitedActions();
case FsmPackage.STATE__EXPECTED_MESSAGE:
if (resolve)
return getExpectedMessage();
......@@ -459,10 +402,12 @@ public class StateImpl extends MinimalEObjectImpl.Container implements State {
getIncomingTransitions().addAll((Collection<? extends Transition>) newValue);
return;
case FsmPackage.STATE__ON_ENTERED_ACTIONS:
setOnEnteredActions((Action) newValue);
getOnEnteredActions().clear();
getOnEnteredActions().addAll((Collection<? extends Action>) newValue);
return;
case FsmPackage.STATE__ON_EXITED_ACTIONS:
setOnExitedActions((Action) newValue);
getOnExitedActions().clear();
getOnExitedActions().addAll((Collection<? extends Action>) newValue);
return;
case FsmPackage.STATE__EXPECTED_MESSAGE:
setExpectedMessage((Message) newValue);
......@@ -492,10 +437,10 @@ public class StateImpl extends MinimalEObjectImpl.Container implements State {
getIncomingTransitions().clear();
return;
case FsmPackage.STATE__ON_ENTERED_ACTIONS:
setOnEnteredActions((Action) null);
getOnEnteredActions().clear();
return;
case FsmPackage.STATE__ON_EXITED_ACTIONS:
setOnExitedActions((Action) null);
getOnExitedActions().clear();
return;
case FsmPackage.STATE__EXPECTED_MESSAGE:
setExpectedMessage((Message) null);
......@@ -521,9 +466,9 @@ public class StateImpl extends MinimalEObjectImpl.Container implements State {
case FsmPackage.STATE__INCOMING_TRANSITIONS:
return incomingTransitions != null && !incomingTransitions.isEmpty();
case FsmPackage.STATE__ON_ENTERED_ACTIONS:
return onEnteredActions != null;
return onEnteredActions != null && !onEnteredActions.isEmpty();
case FsmPackage.STATE__ON_EXITED_ACTIONS:
return onExitedActions != null;
return onExitedActions != null && !onExitedActions.isEmpty();
case FsmPackage.STATE__EXPECTED_MESSAGE:
return expectedMessage != null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment