Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider b725862b rédigé par Erwan BOUSSE's avatar Erwan BOUSSE
Parcourir les fichiers

[sirius] add FSA abstract syntax for demoing

parent 4982a885
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 2856 ajouts et 0 suppression
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fr.univnantes.idm.fsa.abstractsyntax</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.sirius.nature.modelingproject</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: fr.univnantes.idm.fsa.abstractsyntax;singleton:=true
Automatic-Module-Name: fr.univnantes.idm.fsa
Bundle-Version: 0.1.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: fr.univnantes.idm.fsa,
fr.univnantes.idm.fsa.impl,
fr.univnantes.idm.fsa.util
Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
#
bin.includes = .,\
model/,\
META-INF/,\
plugin.xml,\
plugin.properties
jars.compile.order = .
source.. = src-gen/,\
src/
output.. = bin/
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="fsa" nsURI="http://www.example.org/fsa" nsPrefix="fsa">
<eClassifiers xsi:type="ecore:EClass" name="FSAModel">
<eStructuralFeatures xsi:type="ecore:EReference" name="transitions" upperBound="-1"
eType="#//Transition" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="states" upperBound="-1"
eType="#//State" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="State">
<eStructuralFeatures xsi:type="ecore:EReference" name="outgoingTransitions" upperBound="-1"
eType="#//Transition" eOpposite="#//Transition/source"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" upperBound="-1"
eType="#//Transition" eOpposite="#//Transition/target"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isFinal" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isInitial" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Transition">
<eStructuralFeatures xsi:type="ecore:EReference" name="source" lowerBound="1"
eType="#//State" eOpposite="#//State/outgoingTransitions"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
eType="#//State" eOpposite="#//State/incomingTransitions"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="event" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel"
modelDirectory="/fr.univnantes.idm.fsa/src-gen" creationIcons="false"
editDirectory="/fr.univnantes.idm.fsa.edit/src-gen" editorDirectory="/fr.univnantes.idm.fsa.editor/src-gen"
modelPluginID="fr.univnantes.idm.fsa" modelName="Fsa" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
codeFormatting="true" importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0"
copyrightFields="false" operationReflection="true" importOrganizing="true">
<foreignModel>fsa.ecore</foreignModel>
<testsDirectory xsi:nil="true"/>
<genPackages prefix="Fsa" basePackage="fr.univnantes.idm" disposableProviderFactory="true"
ecorePackage="fsa.ecore#/">
<genClasses ecoreClass="fsa.ecore#//FSAModel">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsa.ecore#//FSAModel/transitions"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsa.ecore#//FSAModel/states"/>
</genClasses>
<genClasses ecoreClass="fsa.ecore#//State">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsa.ecore#//State/outgoingTransitions"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsa.ecore#//State/incomingTransitions"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsa.ecore#//State/isFinal"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsa.ecore#//State/isInitial"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsa.ecore#//State/name"/>
</genClasses>
<genClasses ecoreClass="fsa.ecore#//Transition">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsa.ecore#//Transition/source"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsa.ecore#//Transition/target"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsa.ecore#//Transition/event"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
#
pluginName = fr.univnantes.idm.fsa
providerName = www.example.org
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
-->
<plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated fsa -->
<package
uri="http://www.example.org/fsa"
class="fr.univnantes.idm.fsa.FsaPackage"
genModel="model/fsa.genmodel"/>
</extension>
</plugin>
/**
*/
package fr.univnantes.idm.fsa;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>FSA Model</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link fr.univnantes.idm.fsa.FSAModel#getTransitions <em>Transitions</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.FSAModel#getStates <em>States</em>}</li>
* </ul>
*
* @see fr.univnantes.idm.fsa.FsaPackage#getFSAModel()
* @model
* @generated
*/
public interface FSAModel extends EObject {
/**
* Returns the value of the '<em><b>Transitions</b></em>' containment reference list.
* The list contents are of type {@link fr.univnantes.idm.fsa.Transition}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Transitions</em>' containment reference list.
* @see fr.univnantes.idm.fsa.FsaPackage#getFSAModel_Transitions()
* @model containment="true"
* @generated
*/
EList<Transition> getTransitions();
/**
* Returns the value of the '<em><b>States</b></em>' containment reference list.
* The list contents are of type {@link fr.univnantes.idm.fsa.State}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>States</em>' containment reference list.
* @see fr.univnantes.idm.fsa.FsaPackage#getFSAModel_States()
* @model containment="true"
* @generated
*/
EList<State> getStates();
} // FSAModel
/**
*/
package fr.univnantes.idm.fsa;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.FsaPackage
* @generated
*/
public interface FsaFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
FsaFactory eINSTANCE = fr.univnantes.idm.fsa.impl.FsaFactoryImpl.init();
/**
* Returns a new object of class '<em>FSA Model</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>FSA Model</em>'.
* @generated
*/
FSAModel createFSAModel();
/**
* Returns a new object of class '<em>State</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>State</em>'.
* @generated
*/
State createState();
/**
* Returns a new object of class '<em>Transition</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Transition</em>'.
* @generated
*/
Transition createTransition();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
FsaPackage getFsaPackage();
} //FsaFactory
/**
*/
package fr.univnantes.idm.fsa;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.FsaFactory
* @model kind="package"
* @generated
*/
public interface FsaPackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "fsa";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://www.example.org/fsa";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "fsa";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
FsaPackage eINSTANCE = fr.univnantes.idm.fsa.impl.FsaPackageImpl.init();
/**
* The meta object id for the '{@link fr.univnantes.idm.fsa.impl.FSAModelImpl <em>FSA Model</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.impl.FSAModelImpl
* @see fr.univnantes.idm.fsa.impl.FsaPackageImpl#getFSAModel()
* @generated
*/
int FSA_MODEL = 0;
/**
* The feature id for the '<em><b>Transitions</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FSA_MODEL__TRANSITIONS = 0;
/**
* The feature id for the '<em><b>States</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FSA_MODEL__STATES = 1;
/**
* The number of structural features of the '<em>FSA Model</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FSA_MODEL_FEATURE_COUNT = 2;
/**
* The number of operations of the '<em>FSA Model</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FSA_MODEL_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link fr.univnantes.idm.fsa.impl.StateImpl <em>State</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.impl.StateImpl
* @see fr.univnantes.idm.fsa.impl.FsaPackageImpl#getState()
* @generated
*/
int STATE = 1;
/**
* The feature id for the '<em><b>Outgoing Transitions</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int STATE__OUTGOING_TRANSITIONS = 0;
/**
* The feature id for the '<em><b>Incoming Transitions</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int STATE__INCOMING_TRANSITIONS = 1;
/**
* The feature id for the '<em><b>Is Final</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int STATE__IS_FINAL = 2;
/**
* The feature id for the '<em><b>Is Initial</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int STATE__IS_INITIAL = 3;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int STATE__NAME = 4;
/**
* The number of structural features of the '<em>State</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int STATE_FEATURE_COUNT = 5;
/**
* The number of operations of the '<em>State</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int STATE_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link fr.univnantes.idm.fsa.impl.TransitionImpl <em>Transition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.impl.TransitionImpl
* @see fr.univnantes.idm.fsa.impl.FsaPackageImpl#getTransition()
* @generated
*/
int TRANSITION = 2;
/**
* The feature id for the '<em><b>Source</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__SOURCE = 0;
/**
* The feature id for the '<em><b>Target</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__TARGET = 1;
/**
* The feature id for the '<em><b>Event</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__EVENT = 2;
/**
* The number of structural features of the '<em>Transition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION_FEATURE_COUNT = 3;
/**
* The number of operations of the '<em>Transition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION_OPERATION_COUNT = 0;
/**
* Returns the meta object for class '{@link fr.univnantes.idm.fsa.FSAModel <em>FSA Model</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>FSA Model</em>'.
* @see fr.univnantes.idm.fsa.FSAModel
* @generated
*/
EClass getFSAModel();
/**
* Returns the meta object for the containment reference list '{@link fr.univnantes.idm.fsa.FSAModel#getTransitions <em>Transitions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Transitions</em>'.
* @see fr.univnantes.idm.fsa.FSAModel#getTransitions()
* @see #getFSAModel()
* @generated
*/
EReference getFSAModel_Transitions();
/**
* Returns the meta object for the containment reference list '{@link fr.univnantes.idm.fsa.FSAModel#getStates <em>States</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>States</em>'.
* @see fr.univnantes.idm.fsa.FSAModel#getStates()
* @see #getFSAModel()
* @generated
*/
EReference getFSAModel_States();
/**
* Returns the meta object for class '{@link fr.univnantes.idm.fsa.State <em>State</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>State</em>'.
* @see fr.univnantes.idm.fsa.State
* @generated
*/
EClass getState();
/**
* Returns the meta object for the reference list '{@link fr.univnantes.idm.fsa.State#getOutgoingTransitions <em>Outgoing Transitions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Outgoing Transitions</em>'.
* @see fr.univnantes.idm.fsa.State#getOutgoingTransitions()
* @see #getState()
* @generated
*/
EReference getState_OutgoingTransitions();
/**
* Returns the meta object for the reference list '{@link fr.univnantes.idm.fsa.State#getIncomingTransitions <em>Incoming Transitions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Incoming Transitions</em>'.
* @see fr.univnantes.idm.fsa.State#getIncomingTransitions()
* @see #getState()
* @generated
*/
EReference getState_IncomingTransitions();
/**
* Returns the meta object for the attribute '{@link fr.univnantes.idm.fsa.State#isIsFinal <em>Is Final</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Is Final</em>'.
* @see fr.univnantes.idm.fsa.State#isIsFinal()
* @see #getState()
* @generated
*/
EAttribute getState_IsFinal();
/**
* Returns the meta object for the attribute '{@link fr.univnantes.idm.fsa.State#isIsInitial <em>Is Initial</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Is Initial</em>'.
* @see fr.univnantes.idm.fsa.State#isIsInitial()
* @see #getState()
* @generated
*/
EAttribute getState_IsInitial();
/**
* Returns the meta object for the attribute '{@link fr.univnantes.idm.fsa.State#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see fr.univnantes.idm.fsa.State#getName()
* @see #getState()
* @generated
*/
EAttribute getState_Name();
/**
* Returns the meta object for class '{@link fr.univnantes.idm.fsa.Transition <em>Transition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Transition</em>'.
* @see fr.univnantes.idm.fsa.Transition
* @generated
*/
EClass getTransition();
/**
* Returns the meta object for the reference '{@link fr.univnantes.idm.fsa.Transition#getSource <em>Source</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Source</em>'.
* @see fr.univnantes.idm.fsa.Transition#getSource()
* @see #getTransition()
* @generated
*/
EReference getTransition_Source();
/**
* Returns the meta object for the reference '{@link fr.univnantes.idm.fsa.Transition#getTarget <em>Target</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Target</em>'.
* @see fr.univnantes.idm.fsa.Transition#getTarget()
* @see #getTransition()
* @generated
*/
EReference getTransition_Target();
/**
* Returns the meta object for the attribute '{@link fr.univnantes.idm.fsa.Transition#getEvent <em>Event</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Event</em>'.
* @see fr.univnantes.idm.fsa.Transition#getEvent()
* @see #getTransition()
* @generated
*/
EAttribute getTransition_Event();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
FsaFactory getFsaFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link fr.univnantes.idm.fsa.impl.FSAModelImpl <em>FSA Model</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.impl.FSAModelImpl
* @see fr.univnantes.idm.fsa.impl.FsaPackageImpl#getFSAModel()
* @generated
*/
EClass FSA_MODEL = eINSTANCE.getFSAModel();
/**
* The meta object literal for the '<em><b>Transitions</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FSA_MODEL__TRANSITIONS = eINSTANCE.getFSAModel_Transitions();
/**
* The meta object literal for the '<em><b>States</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FSA_MODEL__STATES = eINSTANCE.getFSAModel_States();
/**
* The meta object literal for the '{@link fr.univnantes.idm.fsa.impl.StateImpl <em>State</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.impl.StateImpl
* @see fr.univnantes.idm.fsa.impl.FsaPackageImpl#getState()
* @generated
*/
EClass STATE = eINSTANCE.getState();
/**
* The meta object literal for the '<em><b>Outgoing Transitions</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference STATE__OUTGOING_TRANSITIONS = eINSTANCE.getState_OutgoingTransitions();
/**
* The meta object literal for the '<em><b>Incoming Transitions</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference STATE__INCOMING_TRANSITIONS = eINSTANCE.getState_IncomingTransitions();
/**
* The meta object literal for the '<em><b>Is Final</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute STATE__IS_FINAL = eINSTANCE.getState_IsFinal();
/**
* The meta object literal for the '<em><b>Is Initial</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute STATE__IS_INITIAL = eINSTANCE.getState_IsInitial();
/**
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute STATE__NAME = eINSTANCE.getState_Name();
/**
* The meta object literal for the '{@link fr.univnantes.idm.fsa.impl.TransitionImpl <em>Transition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.impl.TransitionImpl
* @see fr.univnantes.idm.fsa.impl.FsaPackageImpl#getTransition()
* @generated
*/
EClass TRANSITION = eINSTANCE.getTransition();
/**
* The meta object literal for the '<em><b>Source</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TRANSITION__SOURCE = eINSTANCE.getTransition_Source();
/**
* The meta object literal for the '<em><b>Target</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TRANSITION__TARGET = eINSTANCE.getTransition_Target();
/**
* The meta object literal for the '<em><b>Event</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute TRANSITION__EVENT = eINSTANCE.getTransition_Event();
}
} //FsaPackage
/**
*/
package fr.univnantes.idm.fsa;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>State</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link fr.univnantes.idm.fsa.State#getOutgoingTransitions <em>Outgoing Transitions</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.State#getIncomingTransitions <em>Incoming Transitions</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.State#isIsFinal <em>Is Final</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.State#isIsInitial <em>Is Initial</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.State#getName <em>Name</em>}</li>
* </ul>
*
* @see fr.univnantes.idm.fsa.FsaPackage#getState()
* @model
* @generated
*/
public interface State extends EObject {
/**
* Returns the value of the '<em><b>Outgoing Transitions</b></em>' reference list.
* The list contents are of type {@link fr.univnantes.idm.fsa.Transition}.
* It is bidirectional and its opposite is '{@link fr.univnantes.idm.fsa.Transition#getSource <em>Source</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Outgoing Transitions</em>' reference list.
* @see fr.univnantes.idm.fsa.FsaPackage#getState_OutgoingTransitions()
* @see fr.univnantes.idm.fsa.Transition#getSource
* @model opposite="source"
* @generated
*/
EList<Transition> getOutgoingTransitions();
/**
* Returns the value of the '<em><b>Incoming Transitions</b></em>' reference list.
* The list contents are of type {@link fr.univnantes.idm.fsa.Transition}.
* It is bidirectional and its opposite is '{@link fr.univnantes.idm.fsa.Transition#getTarget <em>Target</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Incoming Transitions</em>' reference list.
* @see fr.univnantes.idm.fsa.FsaPackage#getState_IncomingTransitions()
* @see fr.univnantes.idm.fsa.Transition#getTarget
* @model opposite="target"
* @generated
*/
EList<Transition> getIncomingTransitions();
/**
* Returns the value of the '<em><b>Is Final</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Is Final</em>' attribute.
* @see #setIsFinal(boolean)
* @see fr.univnantes.idm.fsa.FsaPackage#getState_IsFinal()
* @model
* @generated
*/
boolean isIsFinal();
/**
* Sets the value of the '{@link fr.univnantes.idm.fsa.State#isIsFinal <em>Is Final</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Final</em>' attribute.
* @see #isIsFinal()
* @generated
*/
void setIsFinal(boolean value);
/**
* Returns the value of the '<em><b>Is Initial</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Is Initial</em>' attribute.
* @see #setIsInitial(boolean)
* @see fr.univnantes.idm.fsa.FsaPackage#getState_IsInitial()
* @model
* @generated
*/
boolean isIsInitial();
/**
* Sets the value of the '{@link fr.univnantes.idm.fsa.State#isIsInitial <em>Is Initial</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Initial</em>' attribute.
* @see #isIsInitial()
* @generated
*/
void setIsInitial(boolean value);
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see fr.univnantes.idm.fsa.FsaPackage#getState_Name()
* @model
* @generated
*/
String getName();
/**
* Sets the value of the '{@link fr.univnantes.idm.fsa.State#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
} // State
/**
*/
package fr.univnantes.idm.fsa;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Transition</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link fr.univnantes.idm.fsa.Transition#getSource <em>Source</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.Transition#getTarget <em>Target</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.Transition#getEvent <em>Event</em>}</li>
* </ul>
*
* @see fr.univnantes.idm.fsa.FsaPackage#getTransition()
* @model
* @generated
*/
public interface Transition extends EObject {
/**
* Returns the value of the '<em><b>Source</b></em>' reference.
* It is bidirectional and its opposite is '{@link fr.univnantes.idm.fsa.State#getOutgoingTransitions <em>Outgoing Transitions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Source</em>' reference.
* @see #setSource(State)
* @see fr.univnantes.idm.fsa.FsaPackage#getTransition_Source()
* @see fr.univnantes.idm.fsa.State#getOutgoingTransitions
* @model opposite="outgoingTransitions" required="true"
* @generated
*/
State getSource();
/**
* Sets the value of the '{@link fr.univnantes.idm.fsa.Transition#getSource <em>Source</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Source</em>' reference.
* @see #getSource()
* @generated
*/
void setSource(State value);
/**
* Returns the value of the '<em><b>Target</b></em>' reference.
* It is bidirectional and its opposite is '{@link fr.univnantes.idm.fsa.State#getIncomingTransitions <em>Incoming Transitions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Target</em>' reference.
* @see #setTarget(State)
* @see fr.univnantes.idm.fsa.FsaPackage#getTransition_Target()
* @see fr.univnantes.idm.fsa.State#getIncomingTransitions
* @model opposite="incomingTransitions" required="true"
* @generated
*/
State getTarget();
/**
* Sets the value of the '{@link fr.univnantes.idm.fsa.Transition#getTarget <em>Target</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Target</em>' reference.
* @see #getTarget()
* @generated
*/
void setTarget(State value);
/**
* Returns the value of the '<em><b>Event</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Event</em>' attribute.
* @see #setEvent(String)
* @see fr.univnantes.idm.fsa.FsaPackage#getTransition_Event()
* @model
* @generated
*/
String getEvent();
/**
* Sets the value of the '{@link fr.univnantes.idm.fsa.Transition#getEvent <em>Event</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Event</em>' attribute.
* @see #getEvent()
* @generated
*/
void setEvent(String value);
} // Transition
/**
*/
package fr.univnantes.idm.fsa.impl;
import fr.univnantes.idm.fsa.FSAModel;
import fr.univnantes.idm.fsa.FsaPackage;
import fr.univnantes.idm.fsa.State;
import fr.univnantes.idm.fsa.Transition;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>FSA Model</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link fr.univnantes.idm.fsa.impl.FSAModelImpl#getTransitions <em>Transitions</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.impl.FSAModelImpl#getStates <em>States</em>}</li>
* </ul>
*
* @generated
*/
public class FSAModelImpl extends MinimalEObjectImpl.Container implements FSAModel {
/**
* The cached value of the '{@link #getTransitions() <em>Transitions</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTransitions()
* @generated
* @ordered
*/
protected EList<Transition> transitions;
/**
* The cached value of the '{@link #getStates() <em>States</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStates()
* @generated
* @ordered
*/
protected EList<State> states;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected FSAModelImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FsaPackage.Literals.FSA_MODEL;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<Transition> getTransitions() {
if (transitions == null) {
transitions = new EObjectContainmentEList<Transition>(Transition.class, this,
FsaPackage.FSA_MODEL__TRANSITIONS);
}
return transitions;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<State> getStates() {
if (states == null) {
states = new EObjectContainmentEList<State>(State.class, this, FsaPackage.FSA_MODEL__STATES);
}
return states;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FsaPackage.FSA_MODEL__TRANSITIONS:
return ((InternalEList<?>) getTransitions()).basicRemove(otherEnd, msgs);
case FsaPackage.FSA_MODEL__STATES:
return ((InternalEList<?>) getStates()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FsaPackage.FSA_MODEL__TRANSITIONS:
return getTransitions();
case FsaPackage.FSA_MODEL__STATES:
return getStates();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FsaPackage.FSA_MODEL__TRANSITIONS:
getTransitions().clear();
getTransitions().addAll((Collection<? extends Transition>) newValue);
return;
case FsaPackage.FSA_MODEL__STATES:
getStates().clear();
getStates().addAll((Collection<? extends State>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FsaPackage.FSA_MODEL__TRANSITIONS:
getTransitions().clear();
return;
case FsaPackage.FSA_MODEL__STATES:
getStates().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FsaPackage.FSA_MODEL__TRANSITIONS:
return transitions != null && !transitions.isEmpty();
case FsaPackage.FSA_MODEL__STATES:
return states != null && !states.isEmpty();
}
return super.eIsSet(featureID);
}
} //FSAModelImpl
/**
*/
package fr.univnantes.idm.fsa.impl;
import fr.univnantes.idm.fsa.*;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class FsaFactoryImpl extends EFactoryImpl implements FsaFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static FsaFactory init() {
try {
FsaFactory theFsaFactory = (FsaFactory) EPackage.Registry.INSTANCE.getEFactory(FsaPackage.eNS_URI);
if (theFsaFactory != null) {
return theFsaFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new FsaFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FsaFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case FsaPackage.FSA_MODEL:
return createFSAModel();
case FsaPackage.STATE:
return createState();
case FsaPackage.TRANSITION:
return createTransition();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public FSAModel createFSAModel() {
FSAModelImpl fsaModel = new FSAModelImpl();
return fsaModel;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public State createState() {
StateImpl state = new StateImpl();
return state;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Transition createTransition() {
TransitionImpl transition = new TransitionImpl();
return transition;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public FsaPackage getFsaPackage() {
return (FsaPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static FsaPackage getPackage() {
return FsaPackage.eINSTANCE;
}
} //FsaFactoryImpl
/**
*/
package fr.univnantes.idm.fsa.impl;
import fr.univnantes.idm.fsa.FSAModel;
import fr.univnantes.idm.fsa.FsaFactory;
import fr.univnantes.idm.fsa.FsaPackage;
import fr.univnantes.idm.fsa.State;
import fr.univnantes.idm.fsa.Transition;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class FsaPackageImpl extends EPackageImpl implements FsaPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass fsaModelEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass stateEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass transitionEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see fr.univnantes.idm.fsa.FsaPackage#eNS_URI
* @see #init()
* @generated
*/
private FsaPackageImpl() {
super(eNS_URI, FsaFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link FsaPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static FsaPackage init() {
if (isInited)
return (FsaPackage) EPackage.Registry.INSTANCE.getEPackage(FsaPackage.eNS_URI);
// Obtain or create and register package
Object registeredFsaPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
FsaPackageImpl theFsaPackage = registeredFsaPackage instanceof FsaPackageImpl
? (FsaPackageImpl) registeredFsaPackage
: new FsaPackageImpl();
isInited = true;
// Create package meta-data objects
theFsaPackage.createPackageContents();
// Initialize created meta-data
theFsaPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theFsaPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(FsaPackage.eNS_URI, theFsaPackage);
return theFsaPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getFSAModel() {
return fsaModelEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getFSAModel_Transitions() {
return (EReference) fsaModelEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getFSAModel_States() {
return (EReference) fsaModelEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getState() {
return stateEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getState_OutgoingTransitions() {
return (EReference) stateEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getState_IncomingTransitions() {
return (EReference) stateEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getState_IsFinal() {
return (EAttribute) stateEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getState_IsInitial() {
return (EAttribute) stateEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getState_Name() {
return (EAttribute) stateEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getTransition() {
return transitionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getTransition_Source() {
return (EReference) transitionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getTransition_Target() {
return (EReference) transitionEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getTransition_Event() {
return (EAttribute) transitionEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public FsaFactory getFsaFactory() {
return (FsaFactory) getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated)
return;
isCreated = true;
// Create classes and their features
fsaModelEClass = createEClass(FSA_MODEL);
createEReference(fsaModelEClass, FSA_MODEL__TRANSITIONS);
createEReference(fsaModelEClass, FSA_MODEL__STATES);
stateEClass = createEClass(STATE);
createEReference(stateEClass, STATE__OUTGOING_TRANSITIONS);
createEReference(stateEClass, STATE__INCOMING_TRANSITIONS);
createEAttribute(stateEClass, STATE__IS_FINAL);
createEAttribute(stateEClass, STATE__IS_INITIAL);
createEAttribute(stateEClass, STATE__NAME);
transitionEClass = createEClass(TRANSITION);
createEReference(transitionEClass, TRANSITION__SOURCE);
createEReference(transitionEClass, TRANSITION__TARGET);
createEAttribute(transitionEClass, TRANSITION__EVENT);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized)
return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
// Initialize classes, features, and operations; add parameters
initEClass(fsaModelEClass, FSAModel.class, "FSAModel", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getFSAModel_Transitions(), this.getTransition(), null, "transitions", null, 0, -1,
FSAModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFSAModel_States(), this.getState(), null, "states", null, 0, -1, FSAModel.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(stateEClass, State.class, "State", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getState_OutgoingTransitions(), this.getTransition(), this.getTransition_Source(),
"outgoingTransitions", 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_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);
initEAttribute(getState_IsFinal(), ecorePackage.getEBoolean(), "isFinal", null, 0, 1, State.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getState_IsInitial(), ecorePackage.getEBoolean(), "isInitial", null, 0, 1, State.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getState_Name(), ecorePackage.getEString(), "name", null, 0, 1, State.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getTransition_Source(), this.getState(), this.getState_OutgoingTransitions(), "source", null, 1,
1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
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_Event(), ecorePackage.getEString(), "event", null, 0, 1, Transition.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
}
} //FsaPackageImpl
/**
*/
package fr.univnantes.idm.fsa.impl;
import fr.univnantes.idm.fsa.FsaPackage;
import fr.univnantes.idm.fsa.State;
import fr.univnantes.idm.fsa.Transition;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>State</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link fr.univnantes.idm.fsa.impl.StateImpl#getOutgoingTransitions <em>Outgoing Transitions</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.impl.StateImpl#getIncomingTransitions <em>Incoming Transitions</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.impl.StateImpl#isIsFinal <em>Is Final</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.impl.StateImpl#isIsInitial <em>Is Initial</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.impl.StateImpl#getName <em>Name</em>}</li>
* </ul>
*
* @generated
*/
public class StateImpl extends MinimalEObjectImpl.Container implements State {
/**
* The cached value of the '{@link #getOutgoingTransitions() <em>Outgoing Transitions</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOutgoingTransitions()
* @generated
* @ordered
*/
protected EList<Transition> outgoingTransitions;
/**
* The cached value of the '{@link #getIncomingTransitions() <em>Incoming Transitions</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIncomingTransitions()
* @generated
* @ordered
*/
protected EList<Transition> incomingTransitions;
/**
* The default value of the '{@link #isIsFinal() <em>Is Final</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsFinal()
* @generated
* @ordered
*/
protected static final boolean IS_FINAL_EDEFAULT = false;
/**
* The cached value of the '{@link #isIsFinal() <em>Is Final</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsFinal()
* @generated
* @ordered
*/
protected boolean isFinal = IS_FINAL_EDEFAULT;
/**
* The default value of the '{@link #isIsInitial() <em>Is Initial</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsInitial()
* @generated
* @ordered
*/
protected static final boolean IS_INITIAL_EDEFAULT = false;
/**
* The cached value of the '{@link #isIsInitial() <em>Is Initial</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsInitial()
* @generated
* @ordered
*/
protected boolean isInitial = IS_INITIAL_EDEFAULT;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected StateImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FsaPackage.Literals.STATE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<Transition> getOutgoingTransitions() {
if (outgoingTransitions == null) {
outgoingTransitions = new EObjectWithInverseResolvingEList<Transition>(Transition.class, this,
FsaPackage.STATE__OUTGOING_TRANSITIONS, FsaPackage.TRANSITION__SOURCE);
}
return outgoingTransitions;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<Transition> getIncomingTransitions() {
if (incomingTransitions == null) {
incomingTransitions = new EObjectWithInverseResolvingEList<Transition>(Transition.class, this,
FsaPackage.STATE__INCOMING_TRANSITIONS, FsaPackage.TRANSITION__TARGET);
}
return incomingTransitions;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isIsFinal() {
return isFinal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setIsFinal(boolean newIsFinal) {
boolean oldIsFinal = isFinal;
isFinal = newIsFinal;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsaPackage.STATE__IS_FINAL, oldIsFinal, isFinal));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isIsInitial() {
return isInitial;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setIsInitial(boolean newIsInitial) {
boolean oldIsInitial = isInitial;
isInitial = newIsInitial;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsaPackage.STATE__IS_INITIAL, oldIsInitial,
isInitial));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsaPackage.STATE__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FsaPackage.STATE__OUTGOING_TRANSITIONS:
return ((InternalEList<InternalEObject>) (InternalEList<?>) getOutgoingTransitions()).basicAdd(otherEnd,
msgs);
case FsaPackage.STATE__INCOMING_TRANSITIONS:
return ((InternalEList<InternalEObject>) (InternalEList<?>) getIncomingTransitions()).basicAdd(otherEnd,
msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FsaPackage.STATE__OUTGOING_TRANSITIONS:
return ((InternalEList<?>) getOutgoingTransitions()).basicRemove(otherEnd, msgs);
case FsaPackage.STATE__INCOMING_TRANSITIONS:
return ((InternalEList<?>) getIncomingTransitions()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FsaPackage.STATE__OUTGOING_TRANSITIONS:
return getOutgoingTransitions();
case FsaPackage.STATE__INCOMING_TRANSITIONS:
return getIncomingTransitions();
case FsaPackage.STATE__IS_FINAL:
return isIsFinal();
case FsaPackage.STATE__IS_INITIAL:
return isIsInitial();
case FsaPackage.STATE__NAME:
return getName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FsaPackage.STATE__OUTGOING_TRANSITIONS:
getOutgoingTransitions().clear();
getOutgoingTransitions().addAll((Collection<? extends Transition>) newValue);
return;
case FsaPackage.STATE__INCOMING_TRANSITIONS:
getIncomingTransitions().clear();
getIncomingTransitions().addAll((Collection<? extends Transition>) newValue);
return;
case FsaPackage.STATE__IS_FINAL:
setIsFinal((Boolean) newValue);
return;
case FsaPackage.STATE__IS_INITIAL:
setIsInitial((Boolean) newValue);
return;
case FsaPackage.STATE__NAME:
setName((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FsaPackage.STATE__OUTGOING_TRANSITIONS:
getOutgoingTransitions().clear();
return;
case FsaPackage.STATE__INCOMING_TRANSITIONS:
getIncomingTransitions().clear();
return;
case FsaPackage.STATE__IS_FINAL:
setIsFinal(IS_FINAL_EDEFAULT);
return;
case FsaPackage.STATE__IS_INITIAL:
setIsInitial(IS_INITIAL_EDEFAULT);
return;
case FsaPackage.STATE__NAME:
setName(NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FsaPackage.STATE__OUTGOING_TRANSITIONS:
return outgoingTransitions != null && !outgoingTransitions.isEmpty();
case FsaPackage.STATE__INCOMING_TRANSITIONS:
return incomingTransitions != null && !incomingTransitions.isEmpty();
case FsaPackage.STATE__IS_FINAL:
return isFinal != IS_FINAL_EDEFAULT;
case FsaPackage.STATE__IS_INITIAL:
return isInitial != IS_INITIAL_EDEFAULT;
case FsaPackage.STATE__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (isFinal: ");
result.append(isFinal);
result.append(", isInitial: ");
result.append(isInitial);
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //StateImpl
/**
*/
package fr.univnantes.idm.fsa.impl;
import fr.univnantes.idm.fsa.FsaPackage;
import fr.univnantes.idm.fsa.State;
import fr.univnantes.idm.fsa.Transition;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Transition</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link fr.univnantes.idm.fsa.impl.TransitionImpl#getSource <em>Source</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.impl.TransitionImpl#getTarget <em>Target</em>}</li>
* <li>{@link fr.univnantes.idm.fsa.impl.TransitionImpl#getEvent <em>Event</em>}</li>
* </ul>
*
* @generated
*/
public class TransitionImpl extends MinimalEObjectImpl.Container implements Transition {
/**
* The cached value of the '{@link #getSource() <em>Source</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSource()
* @generated
* @ordered
*/
protected State source;
/**
* The cached value of the '{@link #getTarget() <em>Target</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTarget()
* @generated
* @ordered
*/
protected State target;
/**
* The default value of the '{@link #getEvent() <em>Event</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEvent()
* @generated
* @ordered
*/
protected static final String EVENT_EDEFAULT = null;
/**
* The cached value of the '{@link #getEvent() <em>Event</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEvent()
* @generated
* @ordered
*/
protected String event = EVENT_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected TransitionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FsaPackage.Literals.TRANSITION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public State getSource() {
if (source != null && source.eIsProxy()) {
InternalEObject oldSource = (InternalEObject) source;
source = (State) eResolveProxy(oldSource);
if (source != oldSource) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsaPackage.TRANSITION__SOURCE, oldSource,
source));
}
}
return source;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public State basicGetSource() {
return source;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSource(State newSource, NotificationChain msgs) {
State oldSource = source;
source = newSource;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
FsaPackage.TRANSITION__SOURCE, oldSource, newSource);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setSource(State newSource) {
if (newSource != source) {
NotificationChain msgs = null;
if (source != null)
msgs = ((InternalEObject) source).eInverseRemove(this, FsaPackage.STATE__OUTGOING_TRANSITIONS,
State.class, msgs);
if (newSource != null)
msgs = ((InternalEObject) newSource).eInverseAdd(this, FsaPackage.STATE__OUTGOING_TRANSITIONS,
State.class, msgs);
msgs = basicSetSource(newSource, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsaPackage.TRANSITION__SOURCE, newSource, newSource));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public State getTarget() {
if (target != null && target.eIsProxy()) {
InternalEObject oldTarget = (InternalEObject) target;
target = (State) eResolveProxy(oldTarget);
if (target != oldTarget) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsaPackage.TRANSITION__TARGET, oldTarget,
target));
}
}
return target;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public State basicGetTarget() {
return target;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetTarget(State newTarget, NotificationChain msgs) {
State oldTarget = target;
target = newTarget;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
FsaPackage.TRANSITION__TARGET, oldTarget, newTarget);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setTarget(State newTarget) {
if (newTarget != target) {
NotificationChain msgs = null;
if (target != null)
msgs = ((InternalEObject) target).eInverseRemove(this, FsaPackage.STATE__INCOMING_TRANSITIONS,
State.class, msgs);
if (newTarget != null)
msgs = ((InternalEObject) newTarget).eInverseAdd(this, FsaPackage.STATE__INCOMING_TRANSITIONS,
State.class, msgs);
msgs = basicSetTarget(newTarget, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsaPackage.TRANSITION__TARGET, newTarget, newTarget));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getEvent() {
return event;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setEvent(String newEvent) {
String oldEvent = event;
event = newEvent;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FsaPackage.TRANSITION__EVENT, oldEvent, event));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FsaPackage.TRANSITION__SOURCE:
if (source != null)
msgs = ((InternalEObject) source).eInverseRemove(this, FsaPackage.STATE__OUTGOING_TRANSITIONS,
State.class, msgs);
return basicSetSource((State) otherEnd, msgs);
case FsaPackage.TRANSITION__TARGET:
if (target != null)
msgs = ((InternalEObject) target).eInverseRemove(this, FsaPackage.STATE__INCOMING_TRANSITIONS,
State.class, msgs);
return basicSetTarget((State) otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FsaPackage.TRANSITION__SOURCE:
return basicSetSource(null, msgs);
case FsaPackage.TRANSITION__TARGET:
return basicSetTarget(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FsaPackage.TRANSITION__SOURCE:
if (resolve)
return getSource();
return basicGetSource();
case FsaPackage.TRANSITION__TARGET:
if (resolve)
return getTarget();
return basicGetTarget();
case FsaPackage.TRANSITION__EVENT:
return getEvent();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FsaPackage.TRANSITION__SOURCE:
setSource((State) newValue);
return;
case FsaPackage.TRANSITION__TARGET:
setTarget((State) newValue);
return;
case FsaPackage.TRANSITION__EVENT:
setEvent((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FsaPackage.TRANSITION__SOURCE:
setSource((State) null);
return;
case FsaPackage.TRANSITION__TARGET:
setTarget((State) null);
return;
case FsaPackage.TRANSITION__EVENT:
setEvent(EVENT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FsaPackage.TRANSITION__SOURCE:
return source != null;
case FsaPackage.TRANSITION__TARGET:
return target != null;
case FsaPackage.TRANSITION__EVENT:
return EVENT_EDEFAULT == null ? event != null : !EVENT_EDEFAULT.equals(event);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (event: ");
result.append(event);
result.append(')');
return result.toString();
}
} //TransitionImpl
/**
*/
package fr.univnantes.idm.fsa.util;
import fr.univnantes.idm.fsa.*;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see fr.univnantes.idm.fsa.FsaPackage
* @generated
*/
public class FsaAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static FsaPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FsaAdapterFactory() {
if (modelPackage == null) {
modelPackage = FsaPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected FsaSwitch<Adapter> modelSwitch = new FsaSwitch<Adapter>() {
@Override
public Adapter caseFSAModel(FSAModel object) {
return createFSAModelAdapter();
}
@Override
public Adapter caseState(State object) {
return createStateAdapter();
}
@Override
public Adapter caseTransition(Transition object) {
return createTransitionAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject) target);
}
/**
* Creates a new adapter for an object of class '{@link fr.univnantes.idm.fsa.FSAModel <em>FSA Model</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see fr.univnantes.idm.fsa.FSAModel
* @generated
*/
public Adapter createFSAModelAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link fr.univnantes.idm.fsa.State <em>State</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see fr.univnantes.idm.fsa.State
* @generated
*/
public Adapter createStateAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link fr.univnantes.idm.fsa.Transition <em>Transition</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see fr.univnantes.idm.fsa.Transition
* @generated
*/
public Adapter createTransitionAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //FsaAdapterFactory
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter