Commit f12a7932 authored by Depasse Arthur's avatar Depasse Arthur

petit changement du modèle ecore pour guard négatives et simplification

parent 98272102
......@@ -60,3 +60,4 @@ _UI_StringToStringMap_value_feature = Value
_UI_Message_name_feature = Name
_UI_FSM_dataTypes_feature = Data Types
_UI_Message_enumsDef_feature = Enums Def
_UI_Transition_InverseGuard_feature = Inverse Guard
......@@ -58,7 +58,6 @@ public class FSMItemProvider extends ItemProviderAdapter implements IEditingDoma
addNamePropertyDescriptor(object);
addInitialStatePropertyDescriptor(object);
addCurrentStatePropertyDescriptor(object);
addFinalStatePropertyDescriptor(object);
addIsServerPropertyDescriptor(object);
addGroupIdPropertyDescriptor(object);
......@@ -95,20 +94,6 @@ public class FSMItemProvider extends ItemProviderAdapter implements IEditingDoma
FsmPackage.Literals.FSM__INITIAL_STATE, true, false, true, null, null, null));
}
/**
* This adds a property descriptor for the Current State feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addCurrentStatePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_FSM_currentState_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FSM_currentState_feature", "_UI_FSM_type"),
FsmPackage.Literals.FSM__CURRENT_STATE, true, false, true, null, null, null));
}
/**
* This adds a property descriptor for the Final State feature.
* <!-- begin-user-doc -->
......
......@@ -59,6 +59,7 @@ public class TransitionItemProvider extends ItemProviderAdapter implements IEdit
addGuardPropertyDescriptor(object);
addEventPropertyDescriptor(object);
addTargetPropertyDescriptor(object);
addInverseGuardPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
......@@ -154,6 +155,22 @@ public class TransitionItemProvider extends ItemProviderAdapter implements IEdit
FsmPackage.Literals.TRANSITION__TARGET, true, false, true, null, null, null));
}
/**
* This adds a property descriptor for the Inverse Guard feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addInverseGuardPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Transition_InverseGuard_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Transition_InverseGuard_feature",
"_UI_Transition_type"),
FsmPackage.Literals.TRANSITION__INVERSE_GUARD, true, false, false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
/**
* This returns Transition.gif.
* <!-- begin-user-doc -->
......@@ -202,6 +219,7 @@ public class TransitionItemProvider extends ItemProviderAdapter implements IEdit
switch (notification.getFeatureID(Transition.class)) {
case FsmPackage.TRANSITION__NAME:
case FsmPackage.TRANSITION__EVENT:
case FsmPackage.TRANSITION__INVERSE_GUARD:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
......
This diff is collapsed.
......@@ -7,8 +7,6 @@
eType="#//State" containment="true" eOpposite="#//State/owningFSM"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="initialState" lowerBound="1"
eType="#//State"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="currentState" lowerBound="1"
eType="#//State"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="finalState" eType="#//State"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedEvents" upperBound="-1"
eType="#//Event" containment="true"/>
......@@ -48,6 +46,7 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="event" lowerBound="1" eType="#//Event"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
eType="#//State" eOpposite="#//State/incomingTransitions"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="InverseGuard" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Event">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
......
......@@ -14,7 +14,6 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsm.ecore#//FSM/name"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsm.ecore#//FSM/ownedStates"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsm.ecore#//FSM/initialState"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsm.ecore#//FSM/currentState"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsm.ecore#//FSM/finalState"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsm.ecore#//FSM/ownedEvents"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsm.ecore#//FSM/isServer"/>
......@@ -40,6 +39,7 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsm.ecore#//Transition/guard"/>
<genFeatures createChild="false" ecoreFeature="ecore:EReference fsm.ecore#//Transition/event"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsm.ecore#//Transition/target"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsm.ecore#//Transition/InverseGuard"/>
</genClasses>
<genClasses ecoreClass="fsm.ecore#//Event">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsm.ecore#//Event/name"/>
......
......@@ -19,7 +19,6 @@ import org.eclipse.emf.ecore.EObject;
* <li>{@link fr.supelec.plong9.fsm.FSM#getName <em>Name</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.FSM#getOwnedStates <em>Owned States</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.FSM#getInitialState <em>Initial State</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.FSM#getCurrentState <em>Current State</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.FSM#getFinalState <em>Final State</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.FSM#getOwnedEvents <em>Owned Events</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.FSM#isIsServer <em>Is Server</em>}</li>
......@@ -105,32 +104,6 @@ public interface FSM extends EObject {
*/
void setInitialState(State value);
/**
* Returns the value of the '<em><b>Current State</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Current State</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Current State</em>' reference.
* @see #setCurrentState(State)
* @see fr.supelec.plong9.fsm.FsmPackage#getFSM_CurrentState()
* @model required="true"
* @generated
*/
State getCurrentState();
/**
* Sets the value of the '{@link fr.supelec.plong9.fsm.FSM#getCurrentState <em>Current State</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Current State</em>' reference.
* @see #getCurrentState()
* @generated
*/
void setCurrentState(State value);
/**
* Returns the value of the '<em><b>Final State</b></em>' reference.
* <!-- begin-user-doc -->
......
......@@ -93,15 +93,6 @@ public interface FsmPackage extends EPackage {
*/
int FSM__INITIAL_STATE = 2;
/**
* The feature id for the '<em><b>Current State</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FSM__CURRENT_STATE = 3;
/**
* The feature id for the '<em><b>Final State</b></em>' reference.
* <!-- begin-user-doc -->
......@@ -109,7 +100,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM__FINAL_STATE = 4;
int FSM__FINAL_STATE = 3;
/**
* The feature id for the '<em><b>Owned Events</b></em>' containment reference list.
......@@ -118,7 +109,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM__OWNED_EVENTS = 5;
int FSM__OWNED_EVENTS = 4;
/**
* The feature id for the '<em><b>Is Server</b></em>' attribute.
......@@ -127,7 +118,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM__IS_SERVER = 6;
int FSM__IS_SERVER = 5;
/**
* The feature id for the '<em><b>Owned Actions</b></em>' containment reference list.
......@@ -136,7 +127,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM__OWNED_ACTIONS = 7;
int FSM__OWNED_ACTIONS = 6;
/**
* The feature id for the '<em><b>Owned Guards</b></em>' containment reference list.
......@@ -145,7 +136,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM__OWNED_GUARDS = 8;
int FSM__OWNED_GUARDS = 7;
/**
* The feature id for the '<em><b>Group Id</b></em>' attribute.
......@@ -154,7 +145,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM__GROUP_ID = 9;
int FSM__GROUP_ID = 8;
/**
* The feature id for the '<em><b>Owned Messages</b></em>' containment reference list.
......@@ -163,7 +154,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM__OWNED_MESSAGES = 10;
int FSM__OWNED_MESSAGES = 9;
/**
* The feature id for the '<em><b>Data Types</b></em>' map.
......@@ -172,7 +163,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM__DATA_TYPES = 11;
int FSM__DATA_TYPES = 10;
/**
* The number of structural features of the '<em>FSM</em>' class.
......@@ -181,7 +172,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int FSM_FEATURE_COUNT = 12;
int FSM_FEATURE_COUNT = 11;
/**
* The number of operations of the '<em>FSM</em>' class.
......@@ -347,6 +338,15 @@ public interface FsmPackage extends EPackage {
*/
int TRANSITION__TARGET = 5;
/**
* The feature id for the '<em><b>Inverse Guard</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__INVERSE_GUARD = 6;
/**
* The number of structural features of the '<em>Transition</em>' class.
* <!-- begin-user-doc -->
......@@ -354,7 +354,7 @@ public interface FsmPackage extends EPackage {
* @generated
* @ordered
*/
int TRANSITION_FEATURE_COUNT = 6;
int TRANSITION_FEATURE_COUNT = 7;
/**
* The number of operations of the '<em>Transition</em>' class.
......@@ -629,17 +629,6 @@ public interface FsmPackage extends EPackage {
*/
EReference getFSM_InitialState();
/**
* Returns the meta object for the reference '{@link fr.supelec.plong9.fsm.FSM#getCurrentState <em>Current State</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Current State</em>'.
* @see fr.supelec.plong9.fsm.FSM#getCurrentState()
* @see #getFSM()
* @generated
*/
EReference getFSM_CurrentState();
/**
* Returns the meta object for the reference '{@link fr.supelec.plong9.fsm.FSM#getFinalState <em>Final State</em>}'.
* <!-- begin-user-doc -->
......@@ -891,6 +880,17 @@ public interface FsmPackage extends EPackage {
*/
EReference getTransition_Target();
/**
* Returns the meta object for the attribute '{@link fr.supelec.plong9.fsm.Transition#isInverseGuard <em>Inverse Guard</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Inverse Guard</em>'.
* @see fr.supelec.plong9.fsm.Transition#isInverseGuard()
* @see #getTransition()
* @generated
*/
EAttribute getTransition_InverseGuard();
/**
* Returns the meta object for class '{@link fr.supelec.plong9.fsm.Event <em>Event</em>}'.
* <!-- begin-user-doc -->
......@@ -1099,14 +1099,6 @@ public interface FsmPackage extends EPackage {
*/
EReference FSM__INITIAL_STATE = eINSTANCE.getFSM_InitialState();
/**
* The meta object literal for the '<em><b>Current State</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FSM__CURRENT_STATE = eINSTANCE.getFSM_CurrentState();
/**
* The meta object literal for the '<em><b>Final State</b></em>' reference feature.
* <!-- begin-user-doc -->
......@@ -1295,6 +1287,14 @@ public interface FsmPackage extends EPackage {
*/
EReference TRANSITION__TARGET = eINSTANCE.getTransition_Target();
/**
* The meta object literal for the '<em><b>Inverse Guard</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute TRANSITION__INVERSE_GUARD = eINSTANCE.getTransition_InverseGuard();
/**
* The meta object literal for the '{@link fr.supelec.plong9.fsm.impl.EventImpl <em>Event</em>}' class.
* <!-- begin-user-doc -->
......
......@@ -21,6 +21,7 @@ import org.eclipse.emf.ecore.EObject;
* <li>{@link fr.supelec.plong9.fsm.Transition#getGuard <em>Guard</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.Transition#getEvent <em>Event</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.Transition#getTarget <em>Target</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.Transition#isInverseGuard <em>Inverse Guard</em>}</li>
* </ul>
*
* @see fr.supelec.plong9.fsm.FsmPackage#getTransition()
......@@ -178,4 +179,30 @@ public interface Transition extends EObject {
*/
void setTarget(State value);
/**
* Returns the value of the '<em><b>Inverse Guard</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Inverse Guard</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Inverse Guard</em>' attribute.
* @see #setInverseGuard(boolean)
* @see fr.supelec.plong9.fsm.FsmPackage#getTransition_InverseGuard()
* @model
* @generated
*/
boolean isInverseGuard();
/**
* Sets the value of the '{@link fr.supelec.plong9.fsm.Transition#isInverseGuard <em>Inverse Guard</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Inverse Guard</em>' attribute.
* @see #isInverseGuard()
* @generated
*/
void setInverseGuard(boolean value);
} // Transition
......@@ -41,7 +41,6 @@ import org.eclipse.emf.ecore.util.InternalEList;
* <li>{@link fr.supelec.plong9.fsm.impl.FSMImpl#getName <em>Name</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.FSMImpl#getOwnedStates <em>Owned States</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.FSMImpl#getInitialState <em>Initial State</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.FSMImpl#getCurrentState <em>Current State</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.FSMImpl#getFinalState <em>Final State</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.FSMImpl#getOwnedEvents <em>Owned Events</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.FSMImpl#isIsServer <em>Is Server</em>}</li>
......@@ -95,16 +94,6 @@ public class FSMImpl extends MinimalEObjectImpl.Container implements FSM {
*/
protected State initialState;
/**
* The cached value of the '{@link #getCurrentState() <em>Current State</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCurrentState()
* @generated
* @ordered
*/
protected State currentState;
/**
* The cached value of the '{@link #getFinalState() <em>Final State</em>}' reference.
* <!-- begin-user-doc -->
......@@ -298,46 +287,6 @@ public class FSMImpl extends MinimalEObjectImpl.Container implements FSM {
initialState));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public State getCurrentState() {
if (currentState != null && currentState.eIsProxy()) {
InternalEObject oldCurrentState = (InternalEObject) currentState;
currentState = (State) eResolveProxy(oldCurrentState);
if (currentState != oldCurrentState) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmPackage.FSM__CURRENT_STATE,
oldCurrentState, currentState));
}
}
return currentState;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public State basicGetCurrentState() {
return currentState;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCurrentState(State newCurrentState) {
State oldCurrentState = currentState;
currentState = newCurrentState;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsmPackage.FSM__CURRENT_STATE, oldCurrentState,
currentState));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -536,10 +485,6 @@ public class FSMImpl extends MinimalEObjectImpl.Container implements FSM {
if (resolve)
return getInitialState();
return basicGetInitialState();
case FsmPackage.FSM__CURRENT_STATE:
if (resolve)
return getCurrentState();
return basicGetCurrentState();
case FsmPackage.FSM__FINAL_STATE:
if (resolve)
return getFinalState();
......@@ -584,9 +529,6 @@ public class FSMImpl extends MinimalEObjectImpl.Container implements FSM {
case FsmPackage.FSM__INITIAL_STATE:
setInitialState((State) newValue);
return;
case FsmPackage.FSM__CURRENT_STATE:
setCurrentState((State) newValue);
return;
case FsmPackage.FSM__FINAL_STATE:
setFinalState((State) newValue);
return;
......@@ -636,9 +578,6 @@ public class FSMImpl extends MinimalEObjectImpl.Container implements FSM {
case FsmPackage.FSM__INITIAL_STATE:
setInitialState((State) null);
return;
case FsmPackage.FSM__CURRENT_STATE:
setCurrentState((State) null);
return;
case FsmPackage.FSM__FINAL_STATE:
setFinalState((State) null);
return;
......@@ -681,8 +620,6 @@ public class FSMImpl extends MinimalEObjectImpl.Container implements FSM {
return ownedStates != null && !ownedStates.isEmpty();
case FsmPackage.FSM__INITIAL_STATE:
return initialState != null;
case FsmPackage.FSM__CURRENT_STATE:
return currentState != null;
case FsmPackage.FSM__FINAL_STATE:
return finalState != null;
case FsmPackage.FSM__OWNED_EVENTS:
......
......@@ -183,22 +183,13 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
return (EReference) fsmEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFSM_CurrentState() {
return (EReference) fsmEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFSM_FinalState() {
return (EReference) fsmEClass.getEStructuralFeatures().get(4);
return (EReference) fsmEClass.getEStructuralFeatures().get(3);
}
/**
......@@ -207,7 +198,7 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
* @generated
*/
public EReference getFSM_OwnedEvents() {
return (EReference) fsmEClass.getEStructuralFeatures().get(5);
return (EReference) fsmEClass.getEStructuralFeatures().get(4);
}
/**
......@@ -216,7 +207,7 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
* @generated
*/
public EAttribute getFSM_IsServer() {
return (EAttribute) fsmEClass.getEStructuralFeatures().get(6);
return (EAttribute) fsmEClass.getEStructuralFeatures().get(5);
}
/**
......@@ -225,7 +216,7 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
* @generated
*/
public EReference getFSM_OwnedActions() {
return (EReference) fsmEClass.getEStructuralFeatures().get(7);
return (EReference) fsmEClass.getEStructuralFeatures().get(6);
}
/**
......@@ -234,7 +225,7 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
* @generated
*/
public EReference getFSM_OwnedGuards() {
return (EReference) fsmEClass.getEStructuralFeatures().get(8);
return (EReference) fsmEClass.getEStructuralFeatures().get(7);
}
/**
......@@ -243,7 +234,7 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
* @generated
*/
public EAttribute getFSM_GroupId() {
return (EAttribute) fsmEClass.getEStructuralFeatures().get(9);
return (EAttribute) fsmEClass.getEStructuralFeatures().get(8);
}
/**
......@@ -252,7 +243,7 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
* @generated
*/
public EReference getFSM_OwnedMessages() {
return (EReference) fsmEClass.getEStructuralFeatures().get(10);
return (EReference) fsmEClass.getEStructuralFeatures().get(9);
}
/**
......@@ -261,7 +252,7 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
* @generated
*/
public EReference getFSM_DataTypes() {
return (EReference) fsmEClass.getEStructuralFeatures().get(11);
return (EReference) fsmEClass.getEStructuralFeatures().get(10);
}
/**
......@@ -399,6 +390,15 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
return (EReference) transitionEClass.getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getTransition_InverseGuard() {
return (EAttribute) transitionEClass.getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -558,7 +558,6 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
createEAttribute(fsmEClass, FSM__NAME);
createEReference(fsmEClass, FSM__OWNED_STATES);
createEReference(fsmEClass, FSM__INITIAL_STATE);
createEReference(fsmEClass, FSM__CURRENT_STATE);
createEReference(fsmEClass, FSM__FINAL_STATE);
createEReference(fsmEClass, FSM__OWNED_EVENTS);
createEAttribute(fsmEClass, FSM__IS_SERVER);
......@@ -584,6 +583,7 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
createEReference(transitionEClass, TRANSITION__GUARD);
createEReference(transitionEClass, TRANSITION__EVENT);
createEReference(transitionEClass, TRANSITION__TARGET);
createEAttribute(transitionEClass, TRANSITION__INVERSE_GUARD);
eventEClass = createEClass(EVENT);
createEAttribute(eventEClass, EVENT__NAME);
......@@ -646,9 +646,6 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
initEReference(getFSM_InitialState(), this.getState(), null, "initialState", null, 1, 1,
fr.supelec.plong9.fsm.FSM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFSM_CurrentState(), this.getState(), null, "currentState", null, 1, 1,
fr.supelec.plong9.fsm.FSM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFSM_FinalState(), this.getState(), null, "finalState", null, 0, 1,
fr.supelec.plong9.fsm.FSM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
......@@ -715,6 +712,9 @@ public class FsmPackageImpl extends EPackageImpl implements FsmPackage {
initEReference(getTransition_Target(), this.getState(), this.getState_IncomingTransitions(), "target", null, 1,
1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getTransition_InverseGuard(), ecorePackage.getEBoolean(), "InverseGuard", null, 0, 1,
Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEClass(eventEClass, Event.class, "Event", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getEvent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Event.class, !IS_TRANSIENT,
......
......@@ -39,6 +39,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
* <li>{@link fr.supelec.plong9.fsm.impl.TransitionImpl#getGuard <em>Guard</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.TransitionImpl#getEvent <em>Event</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.TransitionImpl#getTarget <em>Target</em>}</li>
* <li>{@link fr.supelec.plong9.fsm.impl.TransitionImpl#isInverseGuard <em>Inverse Guard</em>}</li>
* </ul>
*
* @generated
......@@ -104,6 +105,26 @@ public class TransitionImpl extends MinimalEObjectImpl.Container implements Tran
*/
protected State target;
/**
* The default value of the '{@link #isInverseGuard() <em>Inverse Guard</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isInverseGuard()
* @generated
* @ordered
*/
protected static final boolean INVERSE_GUARD_EDEFAULT = false;
/**
* The cached value of the '{@link #isInverseGuard() <em>Inverse Guard</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isInverseGuard()
* @generated
* @ordered
*/
protected boolean inverseGuard = INVERSE_GUARD_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -345,6 +366,28 @@ public class TransitionImpl extends MinimalEObjectImpl.Container implements Tran
eNotify(new ENotificationImpl(this, Notification.SET, FsmPackage.TRANSITION__TARGET, newTarget, newTarget));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isInverseGuard() {
return inverseGuard;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setInverseGuard(boolean newInverseGuard) {
boolean oldInverseGuard = inverseGuard;
inverseGuard = newInverseGuard;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsmPackage.TRANSITION__INVERSE_GUARD, oldInverseGuard,
inverseGuard));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -422,6 +465,8 @@ public class TransitionImpl extends MinimalEObjectImpl.Container implements Tran
if (resolve)
return getTarget();
return basicGetTarget();
case FsmPackage.TRANSITION__INVERSE_GUARD:
return isInverseGuard();
}
return super.eGet(featureID, resolve, coreType);
}
......@@ -454,6 +499,9 @@ public class TransitionImpl extends MinimalEObjectImpl.Container implements Tran
case FsmPackage.TRANSITION__TARGET:
setTarget((State) newValue);
return;
case FsmPackage.TRANSITION__INVERSE_GUARD:
setInverseGuard((Boolean) newValue);
return;
}
super.eSet(featureID, newValue);
}
......@@ -484,6 +532,9 @@ public class TransitionImpl extends MinimalEObjectImpl.Container implements Tran
case FsmPackage.TRANSITION__TARGET:
setTarget((State) null);
return;
case FsmPackage.TRANSITION__INVERSE_GUARD:
setInverseGuard(INVERSE_GUARD_EDEFAULT);
return;
}
super.eUnset(featureID);
}
...