From 42fe9bd17af72f771f48849981430714ba29ff7f Mon Sep 17 00:00:00 2001
From: nullsub <chrisudeussen@gmail.com>
Date: Wed, 13 Jun 2018 09:59:32 +0200
Subject: [PATCH] update editpolicy files

---
 .../AttributeAndOperation.ecl                 |  2 +-
 org.framed.iorm.ui/core/baseRules.ecl         | 18 --------
 org.framed.iorm.ui/core/baseRules.editpolicy  | 43 -------------------
 .../core/fulfillment/Fulfillment.ecl          |  6 ++-
 .../core/fulfillment/Fulfillment.editpolicy   |  4 ++
 org.framed.iorm.ui/core/group/Group.ecl       |  3 ++
 .../core/group/Group.editpolicy               | 11 +++++
 .../core/inheritance/Inheritance.ecl          |  8 +++-
 .../core/inheritance/Inheritance.editpolicy   |  8 ++++
 .../core/naturaltype/NaturalType.ecl          |  3 ++
 .../core/naturaltype/NaturalType.editpolicy   | 11 +++++
 .../modules/compartment/CompartmentTypes.ecl  |  2 +-
 .../ContainsCompartments.ecl                  |  0
 .../ContainsCompartments.editpolicy           |  0
 .../inheritance/CompartmentInheritance.ecl    |  2 +-
 .../playing_own_roles/PlayingOwnRoles.ecl     |  2 +-
 .../PlayingOwnRoles.editpolicy                |  7 +++
 .../properties/CompartmentTypeAttsAndOps.ecl  |  2 +-
 .../modules/datatype/DataTypes.ecl            |  2 +-
 .../inheritance/DataTypeInheritance.ecl       |  2 +-
 .../modules/relationship/Relationship.ecl     |  7 ++-
 .../relationship/Relationship.editpolicy      |  8 ++++
 .../InterRelationship.ecl                     |  2 +-
 .../InterRelationship.editpolicy              |  8 ++++
 .../IntraRelationship.ecl                     |  2 +-
 .../roletype/group_constraints/RoleGroup.ecl  |  2 +-
 .../roletype/inheritance/RoleInheritance.ecl  |  2 +-
 .../properties/RoleTypeAttsAndOps.ecl         |  5 ++-
 .../properties/RoleTypeAttsAndOps.editpolicy  |  8 ++++
 .../role_constraints/RoleConstraints.ecl      |  2 +-
 30 files changed, 102 insertions(+), 80 deletions(-)
 delete mode 100644 org.framed.iorm.ui/core/baseRules.ecl
 delete mode 100644 org.framed.iorm.ui/core/baseRules.editpolicy
 create mode 100644 org.framed.iorm.ui/core/group/Group.ecl
 create mode 100644 org.framed.iorm.ui/core/group/Group.editpolicy
 create mode 100644 org.framed.iorm.ui/core/naturaltype/NaturalType.ecl
 create mode 100644 org.framed.iorm.ui/core/naturaltype/NaturalType.editpolicy
 rename org.framed.iorm.ui/modules/compartment/{containts_compartments => contains_compartments}/ContainsCompartments.ecl (100%)
 rename org.framed.iorm.ui/modules/compartment/{containts_compartments => contains_compartments}/ContainsCompartments.editpolicy (100%)

diff --git a/org.framed.iorm.ui/core/attributeAndOperation/AttributeAndOperation.ecl b/org.framed.iorm.ui/core/attributeAndOperation/AttributeAndOperation.ecl
index d2dfac9a..120acdaa 100644
--- a/org.framed.iorm.ui/core/attributeAndOperation/AttributeAndOperation.ecl
+++ b/org.framed.iorm.ui/core/attributeAndOperation/AttributeAndOperation.ecl
@@ -2,7 +2,7 @@
 Create_Attribute NaturalType (true) when true;  
 Create_Operation NaturalType (true) when true;  
 Create_Property NaturalType (true) when true;  
-Add_Property NaturalType (true) when true;  
+Add_Property NaturalType (true) when true;   
 
 //NaturalType
 Create_Attribute DataType (true) when true;  
diff --git a/org.framed.iorm.ui/core/baseRules.ecl b/org.framed.iorm.ui/core/baseRules.ecl
deleted file mode 100644
index 80f11499..00000000
--- a/org.framed.iorm.ui/core/baseRules.ecl
+++ /dev/null
@@ -1,18 +0,0 @@
-//https://github.com/leondart/FRaMED/wiki/EditPolicy-Rules
-//base rules  
-Add RoleType (true) when InType(CompartmentType);  
-Create RoleType (true) when InType(CompartmentType); 
-
-Add NaturalType (true) when true;
-Add Group (true) when true;
-Create NaturalType (true) when true;
-Create Group (true) when true;
-
-Create Inheritance (true) when true;
-Create Relationship (true) when true;
-
-//enable all context menues
-//Execute CompartmentType (true) when true;
-Execute Relationship (true) when true;
-//Execute Fulfillment (true) when true;
-//Execute Inheritance (true) when true;
diff --git a/org.framed.iorm.ui/core/baseRules.editpolicy b/org.framed.iorm.ui/core/baseRules.editpolicy
deleted file mode 100644
index 44a65f53..00000000
--- a/org.framed.iorm.ui/core/baseRules.editpolicy
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<editpolicymodel:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editpolicymodel="http://framed/editpolicymodel">
-  <policies action="Add" actionType="RoleType">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:InType" type="CompartmentType"/>
-  </policies>
-  <policies actionType="RoleType">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:InType" type="CompartmentType"/>
-  </policies>
-  <policies action="Add" actionType="NaturalType">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies action="Add" actionType="Group">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies actionType="NaturalType">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies actionType="Group">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies actionType="Inheritance">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies actionType="Relationship">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies action="Execute" actionType="CompartmentType">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies action="Execute" actionType="Relationship">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-</editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/core/fulfillment/Fulfillment.ecl b/org.framed.iorm.ui/core/fulfillment/Fulfillment.ecl
index 16067a7e..83c3a991 100644
--- a/org.framed.iorm.ui/core/fulfillment/Fulfillment.ecl
+++ b/org.framed.iorm.ui/core/fulfillment/Fulfillment.ecl
@@ -1,4 +1,4 @@
-//Fullfillment or Players?? 
+//Fullfillment or Players??  
 Start Fulfillment (Naturals) when IsSourceType(NaturalType);  
 Add Fulfillment (Naturals) when IsSourceType(NaturalType) and IsTargetType(CompartmentType);
 Create Fulfillment (Naturals) when IsSourceType(NaturalType) and IsTargetType(CompartmentType);
@@ -17,4 +17,6 @@ Reconnect Fulfillment (Compartments) when IsSourceType(CompartmentType) and IsTa
 Start Fulfillment (Dates) when IsSourceType(DataType);
 Add Fulfillment (Dates) when IsSourceType(DataType);
 Create Fulfillment (Dates) when IsSourceType(DataType);
-Reconnect Fulfillment (Dates) when IsSourceType(DataType);
\ No newline at end of file
+Reconnect Fulfillment (Dates) when IsSourceType(DataType);
+
+Execute Fulfillment (true) when true;
diff --git a/org.framed.iorm.ui/core/fulfillment/Fulfillment.editpolicy b/org.framed.iorm.ui/core/fulfillment/Fulfillment.editpolicy
index 51b84d2d..4e3a7a47 100644
--- a/org.framed.iorm.ui/core/fulfillment/Fulfillment.editpolicy
+++ b/org.framed.iorm.ui/core/fulfillment/Fulfillment.editpolicy
@@ -106,4 +106,8 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Dates"/>
     <constraintRule xsi:type="editpolicymodel:IsSourceType" type="DataType"/>
   </policies>
+  <policies action="Execute" actionType="Fulfillment">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
 </editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/core/group/Group.ecl b/org.framed.iorm.ui/core/group/Group.ecl
new file mode 100644
index 00000000..553d6f17
--- /dev/null
+++ b/org.framed.iorm.ui/core/group/Group.ecl
@@ -0,0 +1,3 @@
+Add Group (true) when true; 
+Create Group (true) when true;
+
diff --git a/org.framed.iorm.ui/core/group/Group.editpolicy b/org.framed.iorm.ui/core/group/Group.editpolicy
new file mode 100644
index 00000000..974841fa
--- /dev/null
+++ b/org.framed.iorm.ui/core/group/Group.editpolicy
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ASCII"?>
+<editpolicymodel:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editpolicymodel="http://framed/editpolicymodel">
+  <policies action="Add" actionType="Group">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
+  <policies actionType="Group">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
+</editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/core/inheritance/Inheritance.ecl b/org.framed.iorm.ui/core/inheritance/Inheritance.ecl
index aa787a7f..521980d3 100644
--- a/org.framed.iorm.ui/core/inheritance/Inheritance.ecl
+++ b/org.framed.iorm.ui/core/inheritance/Inheritance.ecl
@@ -1,4 +1,8 @@
-//Inheritance 
+//Inheritance  
 Start Inheritance (Naturals) when IsSourceType(NaturalType); 
 Add Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType();
-Reconnect Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType();
\ No newline at end of file
+Reconnect Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType();
+
+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 10d72b9c..14ecccc3 100644
--- a/org.framed.iorm.ui/core/inheritance/Inheritance.editpolicy
+++ b/org.framed.iorm.ui/core/inheritance/Inheritance.editpolicy
@@ -18,4 +18,12 @@
       <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/>
     </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:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
 </editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/core/naturaltype/NaturalType.ecl b/org.framed.iorm.ui/core/naturaltype/NaturalType.ecl
new file mode 100644
index 00000000..93bf1c30
--- /dev/null
+++ b/org.framed.iorm.ui/core/naturaltype/NaturalType.ecl
@@ -0,0 +1,3 @@
+Add NaturalType (true) when true; 
+Create NaturalType (true) when true;
+
diff --git a/org.framed.iorm.ui/core/naturaltype/NaturalType.editpolicy b/org.framed.iorm.ui/core/naturaltype/NaturalType.editpolicy
new file mode 100644
index 00000000..788d66ed
--- /dev/null
+++ b/org.framed.iorm.ui/core/naturaltype/NaturalType.editpolicy
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ASCII"?>
+<editpolicymodel:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editpolicymodel="http://framed/editpolicymodel">
+  <policies action="Add" actionType="NaturalType">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
+  <policies actionType="NaturalType">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
+</editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/modules/compartment/CompartmentTypes.ecl b/org.framed.iorm.ui/modules/compartment/CompartmentTypes.ecl
index da2dbcd2..5d6365d9 100644
--- a/org.framed.iorm.ui/modules/compartment/CompartmentTypes.ecl
+++ b/org.framed.iorm.ui/modules/compartment/CompartmentTypes.ecl
@@ -5,4 +5,4 @@ Add CompartmentType (!Compartment_Types) when !InType(CompartmentType) and !Cont
 Create CompartmentType (!Compartment_Types) when !InType(CompartmentType) and !ContainsCompartment();
 Add CompartmentType (Compartment_Types) when !InType(CompartmentType);
 Create CompartmentType (Compartment_Types) when !InType(CompartmentType);
- 
\ No newline at end of file
+  
\ No newline at end of file
diff --git a/org.framed.iorm.ui/modules/compartment/containts_compartments/ContainsCompartments.ecl b/org.framed.iorm.ui/modules/compartment/contains_compartments/ContainsCompartments.ecl
similarity index 100%
rename from org.framed.iorm.ui/modules/compartment/containts_compartments/ContainsCompartments.ecl
rename to org.framed.iorm.ui/modules/compartment/contains_compartments/ContainsCompartments.ecl
diff --git a/org.framed.iorm.ui/modules/compartment/containts_compartments/ContainsCompartments.editpolicy b/org.framed.iorm.ui/modules/compartment/contains_compartments/ContainsCompartments.editpolicy
similarity index 100%
rename from org.framed.iorm.ui/modules/compartment/containts_compartments/ContainsCompartments.editpolicy
rename to org.framed.iorm.ui/modules/compartment/contains_compartments/ContainsCompartments.editpolicy
diff --git a/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl b/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl
index b5105305..9ef3378c 100644
--- a/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl
+++ b/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl
@@ -1,4 +1,4 @@
 //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
-  
\ No newline at end of file
+   
\ No newline at end of file
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 ba0ff5fb..1bb16c02 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,4 +1,4 @@
-//Playing_own_roles
+//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();
diff --git a/org.framed.iorm.ui/modules/compartment/playing_own_roles/PlayingOwnRoles.editpolicy b/org.framed.iorm.ui/modules/compartment/playing_own_roles/PlayingOwnRoles.editpolicy
index 0cd9d775..6a2bcf26 100644
--- a/org.framed.iorm.ui/modules/compartment/playing_own_roles/PlayingOwnRoles.editpolicy
+++ b/org.framed.iorm.ui/modules/compartment/playing_own_roles/PlayingOwnRoles.editpolicy
@@ -11,6 +11,13 @@
       <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/>
     </constraintRule>
   </policies>
+  <policies actionType="Fulfillment">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Playable_by_Defining_Compartment"/>
+    <constraintRule xsi:type="editpolicymodel:AndConstraintRule">
+      <rules xsi:type="editpolicymodel:IsSourceType" type="CompartmentType"/>
+      <rules xsi:type="editpolicymodel:SourceEqualsTargetType"/>
+    </constraintRule>
+  </policies>
   <policies action="Reconnect" actionType="Fulfillment">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Playable_by_Defining_Compartment"/>
     <constraintRule xsi:type="editpolicymodel:AndConstraintRule">
diff --git a/org.framed.iorm.ui/modules/compartment/properties/CompartmentTypeAttsAndOps.ecl b/org.framed.iorm.ui/modules/compartment/properties/CompartmentTypeAttsAndOps.ecl
index 8e1fb921..c5e094b6 100644
--- a/org.framed.iorm.ui/modules/compartment/properties/CompartmentTypeAttsAndOps.ecl
+++ b/org.framed.iorm.ui/modules/compartment/properties/CompartmentTypeAttsAndOps.ecl
@@ -3,4 +3,4 @@ Create_Property CompartmentType (Compartment_Properties) when true;
 Create_Attribute CompartmentType (Compartment_Properties) when true;
 Create_Operation CompartmentType (Compartment_Behavior) when true;
 Add_Property CompartmentType (true) when true; 
- 
\ No newline at end of file
+  
\ No newline at end of file
diff --git a/org.framed.iorm.ui/modules/datatype/DataTypes.ecl b/org.framed.iorm.ui/modules/datatype/DataTypes.ecl
index 1230f976..10a82f09 100644
--- a/org.framed.iorm.ui/modules/datatype/DataTypes.ecl
+++ b/org.framed.iorm.ui/modules/datatype/DataTypes.ecl
@@ -1,3 +1,3 @@
 //DataTypes
 Add DataType (Data_Types) when true;   
-Create DataType (Data_Types) when true;
\ No newline at end of file
+Create DataType (Data_Types) when true; 
\ 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 972f81df..5f16ed67 100644
--- a/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.ecl
+++ b/org.framed.iorm.ui/modules/datatype/inheritance/DataTypeInheritance.ecl
@@ -1,4 +1,4 @@
 //Inheritance or Role_Inheritance/Data_Type_Inheritance/Compartment_Inheritance
-Start Inheritance (Data_Type_Inheritance) when IsSourceType(DataType); 
+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
diff --git a/org.framed.iorm.ui/modules/relationship/Relationship.ecl b/org.framed.iorm.ui/modules/relationship/Relationship.ecl
index e05da9fe..8d14b52c 100644
--- a/org.framed.iorm.ui/modules/relationship/Relationship.ecl
+++ b/org.framed.iorm.ui/modules/relationship/Relationship.ecl
@@ -1,8 +1,11 @@
-//Relationships 
+//Relationships  
 Start Relationship (Relationships) when true;
 Add Relationship (Relationships) when true; 
 Reconnect Relationship (Relationships) when true;
  
 Start Relationship (true) when IsSourceType(RoleType);//For Relationship-Relation Source and Target must be Role-Type	
 Add Relationship (true) when IsTargetType(RoleType) and IsSourceType(RoleType);
-Reconnect Relationship (true) when IsTargetType(RoleType) and IsSourceType(RoleType);
\ No newline at end of file
+Reconnect Relationship (true) when IsTargetType(RoleType) and IsSourceType(RoleType);
+
+Execute Relationship (true) when true;
+Create Relationship (true) when true;
diff --git a/org.framed.iorm.ui/modules/relationship/Relationship.editpolicy b/org.framed.iorm.ui/modules/relationship/Relationship.editpolicy
index 01a89e9e..3ab826e9 100644
--- a/org.framed.iorm.ui/modules/relationship/Relationship.editpolicy
+++ b/org.framed.iorm.ui/modules/relationship/Relationship.editpolicy
@@ -30,4 +30,12 @@
       <rules xsi:type="editpolicymodel:IsSourceType" type="RoleType"/>
     </constraintRule>
   </policies>
+  <policies action="Execute" actionType="Relationship">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
+  <policies actionType="Relationship">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
 </editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/InterRelationship.ecl b/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/InterRelationship.ecl
index c656680d..6d084323 100644
--- a/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/InterRelationship.ecl
+++ b/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/InterRelationship.ecl
@@ -1,4 +1,4 @@
-//InterRelationship 
+//InterRelationship  
 Start RelationshipExclusion (Inter_Relationship_Constraints) when true;
 Add RelationshipExclusion (Inter_Relationship_Constraints) when true; 
 Reconnect RelationshipExclusion (Inter_Relationship_Constraints) when true;
diff --git a/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/InterRelationship.editpolicy b/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/InterRelationship.editpolicy
index 7eff6c62..2a11004b 100644
--- a/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/InterRelationship.editpolicy
+++ b/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/InterRelationship.editpolicy
@@ -12,6 +12,10 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Inter_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
+  <policies actionType="RelationshipExclusion">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Inter_Relationship_Constraints"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
   <policies action="Start" actionType="RelationshipImplication">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Inter_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
@@ -24,4 +28,8 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Inter_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
+  <policies actionType="RelationshipImplication">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Inter_Relationship_Constraints"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
 </editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/IntraRelationship.ecl b/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/IntraRelationship.ecl
index d75f2d79..0de8445a 100644
--- a/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/IntraRelationship.ecl
+++ b/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/IntraRelationship.ecl
@@ -1,4 +1,4 @@
-//IntraRelationshipConstraint
+//IntraRelationshipConstraint 
 Add Irreflexive (Intra_Relationship_Constraints) when true; 
 Start Irreflexive (Intra_Relationship_Constraints) when true;
 Create Irreflexive (Intra_Relationship_Constraints) when true;
diff --git a/org.framed.iorm.ui/modules/roletype/group_constraints/RoleGroup.ecl b/org.framed.iorm.ui/modules/roletype/group_constraints/RoleGroup.ecl
index 19d581b0..71e55777 100644
--- a/org.framed.iorm.ui/modules/roletype/group_constraints/RoleGroup.ecl
+++ b/org.framed.iorm.ui/modules/roletype/group_constraints/RoleGroup.ecl
@@ -1,3 +1,3 @@
-//groupConstraints/RoleGroup 
+//groupConstraints/RoleGroup  
 Add RoleGroup (Group_Constraints) when InType(CompartmentType);  
 Create RoleGroup (Group_Constraints) when InType(CompartmentType); 
\ No newline at end of file
diff --git a/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl b/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl
index 726b2ffa..9616538d 100644
--- a/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl
+++ b/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl
@@ -1,4 +1,4 @@
 //Inheritance or Role_Inheritance/Data_Type_Inheritance/Compartment_Inheritance 
-Start Inheritance (Role_Inheritance) when IsSourceType(RoleType);  
+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
diff --git a/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.ecl b/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.ecl
index 991964df..98cd3fac 100644
--- a/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.ecl
+++ b/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.ecl
@@ -2,4 +2,7 @@
 Create_Property RoleType (Role_Properties) when true;
 Create_Attribute RoleType (Role_Properties) when true; 
 Create_Operation RoleType (Role_Behavior) when true;
-Add_Property RoleType (true) when true;
\ No newline at end of file
+Add_Property RoleType (true) when true; 
+
+Add RoleType (true) when InType(CompartmentType);   
+Create RoleType (true) when InType(CompartmentType); 
diff --git a/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.editpolicy b/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.editpolicy
index d38c44c4..d6dff761 100644
--- a/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.editpolicy
+++ b/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.editpolicy
@@ -16,4 +16,12 @@
     <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
+  <policies action="Add" actionType="RoleType">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:InType" type="CompartmentType"/>
+  </policies>
+  <policies actionType="RoleType">
+    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
+    <constraintRule xsi:type="editpolicymodel:InType" type="CompartmentType"/>
+  </policies>
 </editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleConstraints.ecl b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleConstraints.ecl
index 35506819..21169077 100644
--- a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleConstraints.ecl
+++ b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleConstraints.ecl
@@ -1,4 +1,4 @@
-//RoleConstraints 
+//RoleConstraints  
 Start RoleImplication (Role_Implication) when IsSourceType(RoleType); 
 Add RoleImplication (Role_Implication) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); 
 Reconnect RoleImplication (Role_Implication) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); 
-- 
GitLab