diff --git a/org.framed.iorm.ui/core/inheritance/Inheritance.ecl b/org.framed.iorm.ui/core/inheritance/Inheritance.ecl index 521980d343c0e7fc325dd450130bd5da09dbebf3..69b2cfaecc417dbf3df2efad504aab9c49133f15 100644 --- a/org.framed.iorm.ui/core/inheritance/Inheritance.ecl +++ b/org.framed.iorm.ui/core/inheritance/Inheritance.ecl @@ -1,8 +1,8 @@ //Inheritance Start Inheritance (Naturals) when IsSourceType(NaturalType); -Add Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType(); -Reconnect Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType(); +Add Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType() and !SourceEqualsTarget(); +Reconnect Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType() and !SourceEqualsTarget(); +Create Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType() and !SourceEqualsTarget(); Execute Inheritance (true) when true; -Create Inheritance (true) when true; diff --git a/org.framed.iorm.ui/core/inheritance/Inheritance.editpolicy b/org.framed.iorm.ui/core/inheritance/Inheritance.editpolicy index 14ecccc399e4007764efa9121a9230ac245ed47f..62b39a03217c0e123a1f43bfd65b63be57874afc 100644 --- a/org.framed.iorm.ui/core/inheritance/Inheritance.editpolicy +++ b/org.framed.iorm.ui/core/inheritance/Inheritance.editpolicy @@ -7,22 +7,40 @@ <policies action="Add" actionType="Inheritance"> <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Naturals"/> <constraintRule xsi:type="editpolicymodel:AndConstraintRule"> - <rules xsi:type="editpolicymodel:IsSourceType" type="NaturalType"/> - <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> + <rules xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:IsSourceType" type="NaturalType"/> + <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> + </rules> + <rules xsi:type="editpolicymodel:NotConstraintRule"> + <rule xsi:type="editpolicymodel:SourceEqualsTarget"/> + </rules> </constraintRule> </policies> <policies action="Reconnect" actionType="Inheritance"> <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Naturals"/> <constraintRule xsi:type="editpolicymodel:AndConstraintRule"> - <rules xsi:type="editpolicymodel:IsSourceType" type="NaturalType"/> - <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> + <rules xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:IsSourceType" type="NaturalType"/> + <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> + </rules> + <rules xsi:type="editpolicymodel:NotConstraintRule"> + <rule xsi:type="editpolicymodel:SourceEqualsTarget"/> + </rules> </constraintRule> </policies> - <policies action="Execute" actionType="Inheritance"> - <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/> - <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/> - </policies> <policies actionType="Inheritance"> + <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Naturals"/> + <constraintRule xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:IsSourceType" type="NaturalType"/> + <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> + </rules> + <rules xsi:type="editpolicymodel:NotConstraintRule"> + <rule xsi:type="editpolicymodel:SourceEqualsTarget"/> + </rules> + </constraintRule> + </policies> + <policies action="Execute" actionType="Inheritance"> <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/> <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/> </policies> diff --git a/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl b/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl index 9ef3378cc94dd1d7ba8ad70bddfe3bd911e71e1d..aab00a25e7a5d9871bfd140105ed6d55182b90cc 100644 --- a/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl +++ b/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl @@ -1,4 +1,5 @@ //Inheritance or Role_Inheritance/Data_Type_Inheritance/Compartment_Inheritance Start Inheritance (Compartment_Inheritance) when IsSourceType(CompartmentType); Add Inheritance (Compartment_Inheritance) when IsSourceType(CompartmentType) and !SourceEqualsTarget() and SourceEqualsTargetType(); //acyclic +Create Inheritance (Compartment_Inheritance) when IsSourceType(CompartmentType) and !SourceEqualsTarget() and SourceEqualsTargetType(); //acyclic \ No newline at end of file diff --git a/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.editpolicy b/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.editpolicy index ec8c7943887e46edf9d672cd7caefeff9f7a18f4..23f4d18ceb4359feafc40df7bf82fb04aec4d566 100644 --- a/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.editpolicy +++ b/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.editpolicy @@ -16,4 +16,16 @@ <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> </constraintRule> </policies> + <policies actionType="Inheritance"> + <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Compartment_Inheritance"/> + <constraintRule xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:IsSourceType" type="CompartmentType"/> + <rules xsi:type="editpolicymodel:NotConstraintRule"> + <rule xsi:type="editpolicymodel:SourceEqualsTarget"/> + </rules> + </rules> + <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> + </constraintRule> + </policies> </editpolicymodel:Model> diff --git a/org.framed.iorm.ui/modules/compartment/playing_own_roles/PlayingOwnRoles.ecl b/org.framed.iorm.ui/modules/compartment/playing_own_roles/PlayingOwnRoles.ecl index 1bb16c02a50039fb0d676601859958d7bf81e87e..16418840a3c6c9cc26c71afd36aefb737d788f2b 100644 --- a/org.framed.iorm.ui/modules/compartment/playing_own_roles/PlayingOwnRoles.ecl +++ b/org.framed.iorm.ui/modules/compartment/playing_own_roles/PlayingOwnRoles.ecl @@ -1,5 +1,5 @@ //Playing_own_roles Start Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType); -Add Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType) and SourceEqualsTargetType(); -Create Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType) and SourceEqualsTargetType(); -Reconnect Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType) and SourceEqualsTargetType(); \ No newline at end of file +Add Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType) and SourceEqualsTarget(); +Create Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType) and SourceEqualsTarget(); +Reconnect Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType) and SourceEqualsTarget(); \ No newline at end of file diff --git a/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.ecl b/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.ecl index 5f16ed67c04874634ba3fe3ed37a8ebbef3d031e..735b2261dfd84eebcea1ca42d852265a89c7557f 100644 --- a/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.ecl +++ b/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.ecl @@ -1,4 +1,5 @@ //Inheritance or Role_Inheritance/Data_Type_Inheritance/Compartment_Inheritance Start Inheritance (Data_Type_Inheritance) when IsSourceType(DataType); Add Inheritance (Data_Type_Inheritance) when IsSourceType(DataType) and !SourceEqualsTarget() and SourceEqualsTargetType(); // check acyclic -Reconnect Inheritance (Data_Type_Inheritance) when IsSourceType(DataType) and !SourceEqualsTarget() and SourceEqualsTargetType(); // check acyclic \ No newline at end of file +Reconnect Inheritance (Data_Type_Inheritance) when IsSourceType(DataType) and !SourceEqualsTarget() and SourceEqualsTargetType(); +Create Inheritance (Data_Type_Inheritance) when IsSourceType(DataType) and !SourceEqualsTarget() and SourceEqualsTargetType(); // check acyclic // check acyclic \ No newline at end of file diff --git a/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.editpolicy b/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.editpolicy index 49d98fc4e5a9cf589bef095e4329c2ed5632dc37..e482907a990e843f7d82c42b950fe274fff8caf7 100644 --- a/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.editpolicy +++ b/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.editpolicy @@ -28,4 +28,16 @@ <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> </constraintRule> </policies> + <policies actionType="Inheritance"> + <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Data_Type_Inheritance"/> + <constraintRule xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:IsSourceType" type="DataType"/> + <rules xsi:type="editpolicymodel:NotConstraintRule"> + <rule xsi:type="editpolicymodel:SourceEqualsTarget"/> + </rules> + </rules> + <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> + </constraintRule> + </policies> </editpolicymodel:Model> diff --git a/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl b/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl index 9616538dc51b53077c8d57f1d80f04013f506347..a4ef4808bb9df9807aa1fd97b38fa3afdf3f0660 100644 --- a/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl +++ b/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl @@ -1,4 +1,5 @@ //Inheritance or Role_Inheritance/Data_Type_Inheritance/Compartment_Inheritance Start Inheritance (Role_Inheritance) when IsSourceType(RoleType); Add Inheritance (Role_Inheritance) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); //TODO, check acyclic -Reconnect Inheritance (Role_Inheritance) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); //TODO, check acyclic \ No newline at end of file +Reconnect Inheritance (Role_Inheritance) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); +Create Inheritance (Role_Inheritance) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); //TODO, check acyclic //TODO, check acyclic \ No newline at end of file diff --git a/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.editpolicy b/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.editpolicy index 6afa29cb2cf110862a76afa405b2df10b54c8bbd..46b47e89ca48d23deaa0c62d3850299b07a482b7 100644 --- a/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.editpolicy +++ b/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.editpolicy @@ -28,4 +28,16 @@ <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> </constraintRule> </policies> + <policies actionType="Inheritance"> + <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Role_Inheritance"/> + <constraintRule xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:AndConstraintRule"> + <rules xsi:type="editpolicymodel:IsSourceType" type="RoleType"/> + <rules xsi:type="editpolicymodel:NotConstraintRule"> + <rule xsi:type="editpolicymodel:SourceEqualsTarget"/> + </rules> + </rules> + <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/> + </constraintRule> + </policies> </editpolicymodel:Model>