From ca1c75efe586a388380b09167e0a07cd793b1dd2 Mon Sep 17 00:00:00 2001
From: nullsub <chrisudeussen@gmail.com>
Date: Wed, 13 Jun 2018 00:26:28 +0200
Subject: [PATCH] reenable featurePalette, update Rules

---
 .../AttributeAndOperation.ecl                 | 11 +++++++
 .../AttributeOperationCommonPattern.java      |  6 ++--
 org.framed.iorm.ui/core/baseRules.ecl         | 16 ++++------
 org.framed.iorm.ui/core/baseRules.editpolicy  | 24 ---------------
 .../ChangeConfigurationFeature.java           |  1 -
 .../core/fulfillment/Fulfillment.ecl          |  6 +++-
 .../core/fulfillment/Fulfillment.editpolicy   | 30 +++++++++++++++++++
 .../core/fulfillment/FulfillmentPattern.java  |  3 --
 .../core/inheritance/Inheritance.ecl          |  2 +-
 .../core/inheritance/InheritancePattern.java  | 12 ++++----
 .../core/model/ModelPattern.java              |  3 --
 .../core/naturaltype/NaturalTypePattern.java  |  3 --
 .../core/rolemodel/RoleModelPattern.java      |  7 +----
 .../core/roletype/RoleTypePattern.java        |  5 +---
 .../compartment/CompartmentTypePattern.java   |  4 +--
 .../modules/compartment/CompartmentTypes.ecl  | 10 +++----
 .../ContainsCompartments.ecl                  |  4 +--
 .../inheritance/CompartmentInheritance.ecl    |  2 +-
 .../playing_own_roles/PlayingOwnRoles.ecl     |  3 +-
 .../properties/CompartmentTypeAttsAndOps.ecl  |  2 +-
 .../modules/datatype/DataTypePattern.java     | 12 ++------
 .../modules/datatype/DataTypes.ecl            |  2 +-
 .../inheritance/DataTypeInheritance.ecl       |  2 +-
 .../modules/relationship/Relationship.ecl     |  2 +-
 .../relationship/RelationshipPattern.java     |  8 +----
 ...actInterRelationshipConstraintPattern.java |  8 +----
 .../InterRelationship.ecl                     |  4 ++-
 ...actIntraRelationshipConstraintPattern.java | 10 ++-----
 .../IntraRelationship.ecl                     | 11 ++++++-
 .../IntraRelationship.editpolicy              | 20 +++++++++++++
 .../roletype/group_constraints/RoleGroup.ecl  |  4 +--
 .../group_constraints/RoleGroupPattern.java   |  8 +----
 .../roletype/inheritance/RoleInheritance.ecl  |  2 +-
 .../properties/RoleTypeAttsAndOps.ecl         |  2 +-
 .../AbstractRoleConstraintPattern.java        |  3 --
 .../role_constraints/RoleConstraints.ecl      |  3 ++
 .../RoleEquivalencePattern.java               |  9 +-----
 .../RoleImplicationPattern.java               |  5 ----
 .../RoleProhibitionPattern.java               |  5 ----
 .../ui/editPolicy/ConstraintRuleVisitor.java  |  4 ---
 40 files changed, 127 insertions(+), 151 deletions(-)
 create mode 100644 org.framed.iorm.ui/core/attributeAndOperation/AttributeAndOperation.ecl

diff --git a/org.framed.iorm.ui/core/attributeAndOperation/AttributeAndOperation.ecl b/org.framed.iorm.ui/core/attributeAndOperation/AttributeAndOperation.ecl
new file mode 100644
index 00000000..d2dfac9a
--- /dev/null
+++ b/org.framed.iorm.ui/core/attributeAndOperation/AttributeAndOperation.ecl
@@ -0,0 +1,11 @@
+//NaturalType 
+Create_Attribute NaturalType (true) when true;  
+Create_Operation NaturalType (true) when true;  
+Create_Property NaturalType (true) when true;  
+Add_Property NaturalType (true) when true;  
+
+//NaturalType
+Create_Attribute DataType (true) when true;  
+Create_Operation DataType (true) when true;  
+Create_Property DataType (true) when true;  
+Add_Property DataType (true) when true;  
diff --git a/org.framed.iorm.ui/core/attributeAndOperation/AttributeOperationCommonPattern.java b/org.framed.iorm.ui/core/attributeAndOperation/AttributeOperationCommonPattern.java
index 6ac93254..ed7b7314 100644
--- a/org.framed.iorm.ui/core/attributeAndOperation/AttributeOperationCommonPattern.java
+++ b/org.framed.iorm.ui/core/attributeAndOperation/AttributeOperationCommonPattern.java
@@ -67,7 +67,6 @@ public abstract class AttributeOperationCommonPattern extends FRaMEDShapePattern
 	protected final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 		PaletteCategory.PROPERTIES_CATEGORY,
 		ViewVisibility.ALL_VIEWS) {
-		/*
 			@Override
 			public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 				switch(paletteView) {
@@ -76,10 +75,9 @@ public abstract class AttributeOperationCommonPattern extends FRaMEDShapePattern
 					return (framedFeatureNames.contains("Role_Properties") ||
 							framedFeatureNames.contains("Compartment_Properties"));
 				default: return false;
-		}
+				}
 		}	
-				*/
-		};
+	};
 	
 	/**
 	 * class constructor
diff --git a/org.framed.iorm.ui/core/baseRules.ecl b/org.framed.iorm.ui/core/baseRules.ecl
index 1552f9e9..80f11499 100644
--- a/org.framed.iorm.ui/core/baseRules.ecl
+++ b/org.framed.iorm.ui/core/baseRules.ecl
@@ -1,22 +1,18 @@
 //https://github.com/leondart/FRaMED/wiki/EditPolicy-Rules
- 
-//base rules 
-Add RoleType (true) when InCompartment(); 
-Create RoleType (true) when InCompartment(); 
+//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 RelationshipExclusion (true) when true;
-Create RelationshipImplication (true) when true;
 Create Inheritance (true) when true;
-Create Fulfillment (true) when true;
 Create Relationship (true) when true;
 
 //enable all context menues
-Execute CompartmentType (true) when true;
+//Execute CompartmentType (true) when true;
 Execute Relationship (true) when true;
-Execute Fulfillment (true) when true;
-Execute Inheritance (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
index a25e6b5c..a8989f82 100644
--- a/org.framed.iorm.ui/core/baseRules.editpolicy
+++ b/org.framed.iorm.ui/core/baseRules.editpolicy
@@ -24,40 +24,16 @@
     <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
-  <policies actionType="RelationshipExclusion">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies actionType="RelationshipImplication">
-    <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="Fulfillment">
-    <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>
-  <policies action="Execute" actionType="Fulfillment">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
-  <policies action="Execute" actionType="Inheritance">
-    <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
-    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
-  </policies>
 </editpolicymodel:Model>
diff --git a/org.framed.iorm.ui/core/customFeatures/ChangeConfigurationFeature.java b/org.framed.iorm.ui/core/customFeatures/ChangeConfigurationFeature.java
index 428e7e2b..6594bace 100644
--- a/org.framed.iorm.ui/core/customFeatures/ChangeConfigurationFeature.java
+++ b/org.framed.iorm.ui/core/customFeatures/ChangeConfigurationFeature.java
@@ -23,7 +23,6 @@ import de.ovgu.featureide.fm.core.configuration.Configuration;
 import org.framed.iorm.ui.palette.FeaturePaletteDescriptor; //*import for javadoc link
 import org.framed.iorm.ui.providers.FeatureProvider;
 import org.framed.iorm.ui.configuration.ChangeConfigurationContext; //*import for javadoc link
-import org.framed.iorm.ui.editPolicy.EditPolicyService;
 import org.framed.iorm.ui.configuration.ChangeConfigurationCommand; //*import for javadoc link
 
 
diff --git a/org.framed.iorm.ui/core/fulfillment/Fulfillment.ecl b/org.framed.iorm.ui/core/fulfillment/Fulfillment.ecl
index 008551c9..16067a7e 100644
--- a/org.framed.iorm.ui/core/fulfillment/Fulfillment.ecl
+++ b/org.framed.iorm.ui/core/fulfillment/Fulfillment.ecl
@@ -1,16 +1,20 @@
 //Fullfillment or Players?? 
-Start Fulfillment (Naturals) when IsSourceType(NaturalType); 
+Start Fulfillment (Naturals) when IsSourceType(NaturalType);  
 Add Fulfillment (Naturals) when IsSourceType(NaturalType) and IsTargetType(CompartmentType);
+Create Fulfillment (Naturals) when IsSourceType(NaturalType) and IsTargetType(CompartmentType);
 Reconnect Fulfillment (Naturals) when IsSourceType(NaturalType) and IsTargetType(CompartmentType);
 
 Start Fulfillment (Roles) when IsSourceType(RoleType);
 Add Fulfillment (Roles) when IsSourceType(RoleType) and IsTargetType(CompartmentType);
+Create Fulfillment (Roles) when IsSourceType(RoleType) and IsTargetType(CompartmentType);
 Reconnect Fulfillment (Roles) when IsSourceType(RoleType) and IsTargetType(CompartmentType);
 
 Start Fulfillment (Compartments) when IsSourceType(CompartmentType);
 Add Fulfillment (Compartments) when IsSourceType(CompartmentType) and IsTargetType(CompartmentType) and !SourceEqualsTarget();
+Create Fulfillment (Compartments) when IsSourceType(CompartmentType) and IsTargetType(CompartmentType) and !SourceEqualsTarget();
 Reconnect Fulfillment (Compartments) when IsSourceType(CompartmentType) and IsTargetType(CompartmentType) and !SourceEqualsTarget();
 
 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
diff --git a/org.framed.iorm.ui/core/fulfillment/Fulfillment.editpolicy b/org.framed.iorm.ui/core/fulfillment/Fulfillment.editpolicy
index c513e6b0..51b84d2d 100644
--- a/org.framed.iorm.ui/core/fulfillment/Fulfillment.editpolicy
+++ b/org.framed.iorm.ui/core/fulfillment/Fulfillment.editpolicy
@@ -11,6 +11,13 @@
       <rules xsi:type="editpolicymodel:IsTargetType" type="CompartmentType"/>
     </constraintRule>
   </policies>
+  <policies actionType="Fulfillment">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Naturals"/>
+    <constraintRule xsi:type="editpolicymodel:AndConstraintRule">
+      <rules xsi:type="editpolicymodel:IsSourceType" type="NaturalType"/>
+      <rules xsi:type="editpolicymodel:IsTargetType" type="CompartmentType"/>
+    </constraintRule>
+  </policies>
   <policies action="Reconnect" actionType="Fulfillment">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Naturals"/>
     <constraintRule xsi:type="editpolicymodel:AndConstraintRule">
@@ -29,6 +36,13 @@
       <rules xsi:type="editpolicymodel:IsTargetType" type="CompartmentType"/>
     </constraintRule>
   </policies>
+  <policies actionType="Fulfillment">
+    <featureRule xsi:type="editpolicymodel:IsFeature"/>
+    <constraintRule xsi:type="editpolicymodel:AndConstraintRule">
+      <rules xsi:type="editpolicymodel:IsSourceType" type="RoleType"/>
+      <rules xsi:type="editpolicymodel:IsTargetType" type="CompartmentType"/>
+    </constraintRule>
+  </policies>
   <policies action="Reconnect" actionType="Fulfillment">
     <featureRule xsi:type="editpolicymodel:IsFeature"/>
     <constraintRule xsi:type="editpolicymodel:AndConstraintRule">
@@ -52,6 +66,18 @@
       </rules>
     </constraintRule>
   </policies>
+  <policies actionType="Fulfillment">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Compartments"/>
+    <constraintRule xsi:type="editpolicymodel:AndConstraintRule">
+      <rules xsi:type="editpolicymodel:AndConstraintRule">
+        <rules xsi:type="editpolicymodel:IsSourceType" type="CompartmentType"/>
+        <rules xsi:type="editpolicymodel:IsTargetType" type="CompartmentType"/>
+      </rules>
+      <rules xsi:type="editpolicymodel:NotConstraintRule">
+        <rule xsi:type="editpolicymodel:SourceEqualsTarget"/>
+      </rules>
+    </constraintRule>
+  </policies>
   <policies action="Reconnect" actionType="Fulfillment">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Compartments"/>
     <constraintRule xsi:type="editpolicymodel:AndConstraintRule">
@@ -72,6 +98,10 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Dates"/>
     <constraintRule xsi:type="editpolicymodel:IsSourceType" type="DataType"/>
   </policies>
+  <policies actionType="Fulfillment">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Dates"/>
+    <constraintRule xsi:type="editpolicymodel:IsSourceType" type="DataType"/>
+  </policies>
   <policies action="Reconnect" actionType="Fulfillment">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Dates"/>
     <constraintRule xsi:type="editpolicymodel:IsSourceType" type="DataType"/>
diff --git a/org.framed.iorm.ui/core/fulfillment/FulfillmentPattern.java b/org.framed.iorm.ui/core/fulfillment/FulfillmentPattern.java
index 0d8d86ab..a9f020d7 100644
--- a/org.framed.iorm.ui/core/fulfillment/FulfillmentPattern.java
+++ b/org.framed.iorm.ui/core/fulfillment/FulfillmentPattern.java
@@ -1,8 +1,5 @@
 package fulfillment;
 
-import java.util.Arrays;
-import java.util.List;
-
 import org.eclipse.graphiti.features.IFeature;
 import org.eclipse.graphiti.features.context.IAddConnectionContext;
 import org.eclipse.graphiti.features.context.IAddContext;
diff --git a/org.framed.iorm.ui/core/inheritance/Inheritance.ecl b/org.framed.iorm.ui/core/inheritance/Inheritance.ecl
index b8562dd2..aa787a7f 100644
--- a/org.framed.iorm.ui/core/inheritance/Inheritance.ecl
+++ b/org.framed.iorm.ui/core/inheritance/Inheritance.ecl
@@ -1,4 +1,4 @@
-//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
diff --git a/org.framed.iorm.ui/core/inheritance/InheritancePattern.java b/org.framed.iorm.ui/core/inheritance/InheritancePattern.java
index b3268ec1..0c4a0889 100644
--- a/org.framed.iorm.ui/core/inheritance/InheritancePattern.java
+++ b/org.framed.iorm.ui/core/inheritance/InheritancePattern.java
@@ -1,6 +1,5 @@
 package inheritance;
 
-import java.util.Arrays;
 import java.util.List;
 
 import org.eclipse.graphiti.features.context.IAddConnectionContext;
@@ -49,7 +48,6 @@ public class InheritancePattern extends FRaMEDConnectionPattern {
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 		PaletteCategory.RELATIONS_CATEGORY,
 		ViewVisibility.ALL_VIEWS) {
-		/*
 			@Override
 			public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 				switch(paletteView) {
@@ -59,9 +57,9 @@ public class InheritancePattern extends FRaMEDConnectionPattern {
 							    (framedFeatureNames.contains("Compartment_Inheritance") &&
 							     framedFeatureNames.contains("Contains_Compartments")));
 					default: return false;
-			}	}
-			*/
-				};
+			}	
+		}
+	};
 	
 	/**
 	 * class constructor		
@@ -178,7 +176,7 @@ public class InheritancePattern extends FRaMEDConnectionPattern {
 			org.framed.iorm.model.Shape targetShape = (org.framed.iorm.model.Shape) target;
 			if(sourceShape != null && targetShape != null && sM == tM) {
 				return EditPolicyService.getHandler(this.getDiagram()).canCreate(createContext, Type.INHERITANCE);
-				}
+			}
 		}
 	    return false;
 	}
@@ -239,7 +237,7 @@ public class InheritancePattern extends FRaMEDConnectionPattern {
 	/**
 	 * searches for the main or group model the inheritance should be added to
 	 */
-	public Model getModelToCreateIn(org.framed.iorm.model.ModelElement sourceShape) {
+	public Model getModelToCreateIn(org.framed.iorm.model.ModelElement sourceShape) { //FIXME
 		while(sourceShape.getContainer() != null) {
 			if(sourceShape.getContainer().getParent() == null ||
 			   (sourceShape.getContainer().getParent() != null &&
diff --git a/org.framed.iorm.ui/core/model/ModelPattern.java b/org.framed.iorm.ui/core/model/ModelPattern.java
index 5ed94d6a..84658a16 100644
--- a/org.framed.iorm.ui/core/model/ModelPattern.java
+++ b/org.framed.iorm.ui/core/model/ModelPattern.java
@@ -2,7 +2,6 @@ package model;
 
 import java.io.IOException;
 import java.net.URISyntaxException;
-import java.net.URL;
 
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.emf.common.util.URI;
@@ -15,11 +14,9 @@ import org.eclipse.graphiti.mm.pictograms.PictogramElement;
 import org.eclipse.graphiti.pattern.IPattern;
 import org.framed.iorm.model.Model;
 import org.framed.iorm.model.OrmFactory;
-import org.framed.iorm.model.Type;
 import org.framed.iorm.ui.FRaMEDShapePattern;
 import org.framed.iorm.ui.UILiterals;
 import org.framed.iorm.ui.UIUtil;
-import org.framed.iorm.ui.editPolicy.EditPolicyService;
 import org.framed.iorm.ui.palette.FeaturePaletteDescriptor;
 import org.framed.iorm.ui.palette.PaletteCategory;
 import org.framed.iorm.ui.palette.ViewVisibility;
diff --git a/org.framed.iorm.ui/core/naturaltype/NaturalTypePattern.java b/org.framed.iorm.ui/core/naturaltype/NaturalTypePattern.java
index c26730c3..5a38263b 100644
--- a/org.framed.iorm.ui/core/naturaltype/NaturalTypePattern.java
+++ b/org.framed.iorm.ui/core/naturaltype/NaturalTypePattern.java
@@ -80,9 +80,6 @@ public class NaturalTypePattern extends FRaMEDShapePattern implements IPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-//	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-//			PaletteCategory.ENTITIES_CATEGORY,
-//			ViewVisibility.TOPLEVEL_VIEW);
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.ENTITIES_CATEGORY,
 			ViewVisibility.TOPLEVEL_VIEW);
diff --git a/org.framed.iorm.ui/core/rolemodel/RoleModelPattern.java b/org.framed.iorm.ui/core/rolemodel/RoleModelPattern.java
index 0a95f89f..6b86a48f 100644
--- a/org.framed.iorm.ui/core/rolemodel/RoleModelPattern.java
+++ b/org.framed.iorm.ui/core/rolemodel/RoleModelPattern.java
@@ -106,18 +106,13 @@ public class RoleModelPattern extends FRaMEDShapePattern implements IPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */	
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 		PaletteCategory.ENTITIES_CATEGORY,
 		ViewVisibility.TOPLEVEL_VIEW) {
 			@Override
 			public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 				return !(framedFeatureNames.contains("Compartment_Types"));
-		}	};*/
-		private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-				PaletteCategory.ENTITIES_CATEGORY,
-				ViewVisibility.ALL_VIEWS) {
-				};
+		}	};
 		
 	/**
 	 * class constructor		
diff --git a/org.framed.iorm.ui/core/roletype/RoleTypePattern.java b/org.framed.iorm.ui/core/roletype/RoleTypePattern.java
index 3988495c..c80d897b 100644
--- a/org.framed.iorm.ui/core/roletype/RoleTypePattern.java
+++ b/org.framed.iorm.ui/core/roletype/RoleTypePattern.java
@@ -88,12 +88,9 @@ public class RoleTypePattern extends FRaMEDShapePattern implements IPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-//	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-//			PaletteCategory.ENTITIES_CATEGORY,
-//			ViewVisibility.COMPARTMENT_VIEW);
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.ENTITIES_CATEGORY,
-			ViewVisibility.ALL_VIEWS);
+			ViewVisibility.COMPARTMENT_VIEW);
 	
 	/**
 	 * class constructor		
diff --git a/org.framed.iorm.ui/modules/compartment/CompartmentTypePattern.java b/org.framed.iorm.ui/modules/compartment/CompartmentTypePattern.java
index 55975152..b8cb1e6b 100644
--- a/org.framed.iorm.ui/modules/compartment/CompartmentTypePattern.java
+++ b/org.framed.iorm.ui/modules/compartment/CompartmentTypePattern.java
@@ -108,7 +108,6 @@ public class CompartmentTypePattern extends FRaMEDShapePattern implements IPatte
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 		PaletteCategory.ENTITIES_CATEGORY,
 		ViewVisibility.ALL_VIEWS) {
-		/*
 			@Override
 			public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 				switch(paletteView) {
@@ -116,8 +115,7 @@ public class CompartmentTypePattern extends FRaMEDShapePattern implements IPatte
 					case COMPARTMENT_VIEW: return framedFeatureNames.contains("Contains_Compartments");
 					default: return false;
 		}	}
-		*/
-			};
+	};
 	
 	/**
 	 * class constructor		
diff --git a/org.framed.iorm.ui/modules/compartment/CompartmentTypes.ecl b/org.framed.iorm.ui/modules/compartment/CompartmentTypes.ecl
index f80f120a..da2dbcd2 100644
--- a/org.framed.iorm.ui/modules/compartment/CompartmentTypes.ecl
+++ b/org.framed.iorm.ui/modules/compartment/CompartmentTypes.ecl
@@ -1,8 +1,8 @@
 //compartmentTypes
 //If Compartment_Types is not set, then only one CompartmentType can be
-//added in the top-level view (This will be named RoleModel).
-Add CompartmentType (!Compartment_Types) when !InCompartment() and !ContainsCompartment();
-Create CompartmentType (!Compartment_Types) when !InCompartment() and !ContainsCompartment();
-Add CompartmentType (Compartment_Types) when !InCompartment();
-Create CompartmentType (Compartment_Types) when !InCompartment();
+//added in the top-level view (This will be named RoleModel).  
+Add CompartmentType (!Compartment_Types) when !InType(CompartmentType) and !ContainsCompartment();
+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
diff --git a/org.framed.iorm.ui/modules/compartment/containts_compartments/ContainsCompartments.ecl b/org.framed.iorm.ui/modules/compartment/containts_compartments/ContainsCompartments.ecl
index 1c374da4..9aed47a5 100644
--- a/org.framed.iorm.ui/modules/compartment/containts_compartments/ContainsCompartments.ecl
+++ b/org.framed.iorm.ui/modules/compartment/containts_compartments/ContainsCompartments.ecl
@@ -1,3 +1,3 @@
 //ContainsCompartments
-Add CompartmentType (Contains_Compartments) when InCompartment();
-Create CompartmentType (Contains_Compartments) when InCompartment(); 
\ No newline at end of file
+Add CompartmentType (Contains_Compartments) when InType(CompartmentType);
+Create CompartmentType (Contains_Compartments) when InType(CompartmentType); 
\ No newline at end of file
diff --git a/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl b/org.framed.iorm.ui/modules/compartment/inheritance/CompartmentInheritance.ecl
index 35e295cc..b5105305 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 a8e6ca77..ba0ff5fb 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,5 @@
 //Playing_own_roles
-Start Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType);
+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
diff --git a/org.framed.iorm.ui/modules/compartment/properties/CompartmentTypeAttsAndOps.ecl b/org.framed.iorm.ui/modules/compartment/properties/CompartmentTypeAttsAndOps.ecl
index b223b457..8e1fb921 100644
--- a/org.framed.iorm.ui/modules/compartment/properties/CompartmentTypeAttsAndOps.ecl
+++ b/org.framed.iorm.ui/modules/compartment/properties/CompartmentTypeAttsAndOps.ecl
@@ -2,5 +2,5 @@
 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;
+Add_Property CompartmentType (true) when true; 
  
\ No newline at end of file
diff --git a/org.framed.iorm.ui/modules/datatype/DataTypePattern.java b/org.framed.iorm.ui/modules/datatype/DataTypePattern.java
index 0bad837d..3072bc09 100644
--- a/org.framed.iorm.ui/modules/datatype/DataTypePattern.java
+++ b/org.framed.iorm.ui/modules/datatype/DataTypePattern.java
@@ -39,8 +39,8 @@ import org.framed.iorm.ui.UIUtil;
 import org.framed.iorm.ui.editPolicy.EditPolicyService;
 import org.framed.iorm.ui.palette.FeaturePaletteDescriptor;
 import org.framed.iorm.ui.palette.PaletteCategory;
-import org.framed.iorm.ui.palette.PaletteView;
 import org.framed.iorm.ui.palette.ViewVisibility;
+import org.framed.iorm.ui.palette.PaletteView;
 import org.framed.iorm.ui.references.AbstractAttributeAndOperationReference;
 
 /**
@@ -82,20 +82,14 @@ public class DataTypePattern extends FRaMEDShapePattern implements IPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.ENTITIES_CATEGORY,
 			ViewVisibility.TOPLEVEL_VIEW) {
 				@Override
 				public boolean featureExpression(List<String> featureNames, PaletteView paletteView) {
 					return featureNames.contains("Data_Types");		
-			}	};
-			
-			*/
-			private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-					PaletteCategory.ENTITIES_CATEGORY,
-					ViewVisibility.ALL_VIEWS) {
-						};
+			}	
+		};
 			
 	/**
 	 * class constructor		
diff --git a/org.framed.iorm.ui/modules/datatype/DataTypes.ecl b/org.framed.iorm.ui/modules/datatype/DataTypes.ecl
index 10794ec2..1230f976 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;  
+Add DataType (Data_Types) when true;   
 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 2d883b00..972f81df 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 e7ce2db4..e05da9fe 100644
--- a/org.framed.iorm.ui/modules/relationship/Relationship.ecl
+++ b/org.framed.iorm.ui/modules/relationship/Relationship.ecl
@@ -1,6 +1,6 @@
 //Relationships 
 Start Relationship (Relationships) when true;
-Add 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	
diff --git a/org.framed.iorm.ui/modules/relationship/RelationshipPattern.java b/org.framed.iorm.ui/modules/relationship/RelationshipPattern.java
index 7a292c18..3ccacd49 100644
--- a/org.framed.iorm.ui/modules/relationship/RelationshipPattern.java
+++ b/org.framed.iorm.ui/modules/relationship/RelationshipPattern.java
@@ -1,7 +1,6 @@
 package relationship;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 import org.eclipse.graphiti.features.IFeature;
@@ -59,7 +58,6 @@ public class RelationshipPattern extends FRaMEDConnectionPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.RELATIONS_CATEGORY,
 			ViewVisibility.COMPARTMENT_VIEW) {
@@ -67,11 +65,7 @@ public class RelationshipPattern extends FRaMEDConnectionPattern {
 				public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 					return framedFeatureNames.contains("Relationships");
 			}	};
-			*/
-			private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-					PaletteCategory.RELATIONS_CATEGORY,
-					ViewVisibility.ALL_VIEWS) {
-			};	
+
 	/**
 	 * class constructor		
 	 */
diff --git a/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/AbstractInterRelationshipConstraintPattern.java b/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/AbstractInterRelationshipConstraintPattern.java
index a310af19..4b7bc607 100644
--- a/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/AbstractInterRelationshipConstraintPattern.java
+++ b/org.framed.iorm.ui/modules/relationship/inter_relationship_constraints/AbstractInterRelationshipConstraintPattern.java
@@ -44,7 +44,6 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.CONSTRAINTS_CATEGORY,
 			ViewVisibility.COMPARTMENT_VIEW) {
@@ -52,12 +51,7 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC
 				public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 					return framedFeatureNames.contains("Inter_Relationship_Constraints");
 			}	};
-			
-			*/
-			private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-					PaletteCategory.CONSTRAINTS_CATEGORY,
-					ViewVisibility.ALL_VIEWS) {
-					};
+	
 	
 	/**
 	 * Class constructor
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 4eafbaff..c656680d 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,8 +1,10 @@
 //InterRelationship 
 Start RelationshipExclusion (Inter_Relationship_Constraints) when true;
-Add RelationshipExclusion (Inter_Relationship_Constraints) when true;
+Add RelationshipExclusion (Inter_Relationship_Constraints) when true; 
 Reconnect RelationshipExclusion (Inter_Relationship_Constraints) when true;
+Create RelationshipExclusion (Inter_Relationship_Constraints) when true;
 
 Start RelationshipImplication (Inter_Relationship_Constraints) when true;
 Add RelationshipImplication (Inter_Relationship_Constraints) when true;
 Reconnect RelationshipImplication (Inter_Relationship_Constraints) when true;
+Create RelationshipImplication (Inter_Relationship_Constraints) when true;
diff --git a/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/AbstractIntraRelationshipConstraintPattern.java b/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/AbstractIntraRelationshipConstraintPattern.java
index e4f86d4d..e38b375d 100644
--- a/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/AbstractIntraRelationshipConstraintPattern.java
+++ b/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/AbstractIntraRelationshipConstraintPattern.java
@@ -48,7 +48,6 @@ public abstract class AbstractIntraRelationshipConstraintPattern extends FRaMEDS
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.CONSTRAINTS_CATEGORY,
 			ViewVisibility.COMPARTMENT_VIEW) {
@@ -56,11 +55,6 @@ public abstract class AbstractIntraRelationshipConstraintPattern extends FRaMEDS
 				public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 					return framedFeatureNames.contains("Intra_Relationship_Constraints");
 			}	};
-			*/
-			private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-					PaletteCategory.CONSTRAINTS_CATEGORY,
-					ViewVisibility.ALL_VIEWS) {
-					};
 			
 	/**
 	 * Class constructor
@@ -192,7 +186,9 @@ public abstract class AbstractIntraRelationshipConstraintPattern extends FRaMEDS
 		AddContext addContext = new AddContext();
 	    addContext.setNewObject(newIntraRelCon);
 	    addContext.setTargetConnection(targetConnection);
-	    if(aircp.canAdd(addContext)) aircp.add(addContext);
+	    if(aircp.canAdd(addContext)) {
+	    	aircp.add(addContext); //FIXME: ?
+	    }
 		return new Object[] { newIntraRelCon }; 
 	}
 	
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 092c74b1..d75f2d79 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,11 +1,20 @@
 //IntraRelationshipConstraint
-Add Irreflexive (Intra_Relationship_Constraints) when true;
+Add Irreflexive (Intra_Relationship_Constraints) when true; 
 Start Irreflexive (Intra_Relationship_Constraints) when true;
+Create Irreflexive (Intra_Relationship_Constraints) when true;
+
 Add Acyclic (Intra_Relationship_Constraints) when true;
 Start Acyclic (Intra_Relationship_Constraints) when true;
+Create Acyclic (Intra_Relationship_Constraints) when true;
+
 Add Cyclic (Intra_Relationship_Constraints) when true;
 Start Cyclic (Intra_Relationship_Constraints) when true;
+Create Cyclic (Intra_Relationship_Constraints) when true;
+
 Add Reflexive (Intra_Relationship_Constraints) when true;
 Start Reflexive (Intra_Relationship_Constraints) when true;
+Create Reflexive (Intra_Relationship_Constraints) when true;
+
 Add Total (Intra_Relationship_Constraints) when true;
 Start Total (Intra_Relationship_Constraints) when true;
+Create Total (Intra_Relationship_Constraints) when true;
diff --git a/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/IntraRelationship.editpolicy b/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/IntraRelationship.editpolicy
index 8a701fa1..45510f0d 100644
--- a/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/IntraRelationship.editpolicy
+++ b/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/IntraRelationship.editpolicy
@@ -8,6 +8,10 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
+  <policies actionType="Irreflexive">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
   <policies action="Add">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
@@ -16,6 +20,10 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
+  <policies>
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
   <policies action="Add" actionType="Cyclic">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
@@ -24,6 +32,10 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
+  <policies actionType="Cyclic">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
   <policies action="Add" actionType="Reflexive">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
@@ -32,6 +44,10 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
+  <policies actionType="Reflexive">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
   <policies action="Add" actionType="Total">
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
@@ -40,4 +56,8 @@
     <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
     <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
   </policies>
+  <policies actionType="Total">
+    <featureRule xsi:type="editpolicymodel:IsFeature" featureName="Intra_Relationship_Constraints"/>
+    <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
+  </policies>
 </editpolicymodel:Model>
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 5063e0e9..19d581b0 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 
-Add RoleGroup (Group_Constraints) when InCompartment();  
-Create RoleGroup (Group_Constraints) when InCompartment();
+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/group_constraints/RoleGroupPattern.java b/org.framed.iorm.ui/modules/roletype/group_constraints/RoleGroupPattern.java
index 2c7e3678..91bbaefa 100644
--- a/org.framed.iorm.ui/modules/roletype/group_constraints/RoleGroupPattern.java
+++ b/org.framed.iorm.ui/modules/roletype/group_constraints/RoleGroupPattern.java
@@ -82,7 +82,6 @@ public class RoleGroupPattern extends FRaMEDShapePattern implements IPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */	
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 		PaletteCategory.ENTITIES_CATEGORY,
 		ViewVisibility.ALL_VIEWS) {
@@ -93,12 +92,7 @@ public class RoleGroupPattern extends FRaMEDShapePattern implements IPattern {
 					case COMPARTMENT_VIEW: return framedFeatureNames.contains("Group_Constraints");
 					default: return false;
 		}	}	};
-		*/
-		private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-				PaletteCategory.ENTITIES_CATEGORY,
-				ViewVisibility.ALL_VIEWS) {
-			
-		};
+	
 
 	/**
 	 * class constructor		
diff --git a/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl b/org.framed.iorm.ui/modules/roletype/inheritance/RoleInheritance.ecl
index 1cf156b1..726b2ffa 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 68c04876..991964df 100644
--- a/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.ecl
+++ b/org.framed.iorm.ui/modules/roletype/properties/RoleTypeAttsAndOps.ecl
@@ -1,5 +1,5 @@
 //Role Structure 
 Create_Property RoleType (Role_Properties) when true;
-Create_Attribute 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
diff --git a/org.framed.iorm.ui/modules/roletype/role_constraints/AbstractRoleConstraintPattern.java b/org.framed.iorm.ui/modules/roletype/role_constraints/AbstractRoleConstraintPattern.java
index fd2e3b71..2f40db8c 100644
--- a/org.framed.iorm.ui/modules/roletype/role_constraints/AbstractRoleConstraintPattern.java
+++ b/org.framed.iorm.ui/modules/roletype/role_constraints/AbstractRoleConstraintPattern.java
@@ -1,8 +1,5 @@
 package roletype.role_constraints;
 
-import java.util.Arrays;
-import java.util.List;
-
 import org.eclipse.graphiti.features.context.IAddContext;
 import org.eclipse.graphiti.features.context.ICreateConnectionContext;
 import org.eclipse.graphiti.features.context.IReconnectionContext;
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 ad20c5f9..35506819 100644
--- a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleConstraints.ecl
+++ b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleConstraints.ecl
@@ -2,11 +2,14 @@
 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(); 
+Create RoleProhibition (true) when true;
  
 Start RoleEquivalence (Role_Equivalence) when IsSourceType(RoleType); 
 Add RoleEquivalence (Role_Equivalence) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); 
 Reconnect RoleEquivalence (Role_Equivalence) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); 
+Create RoleProhibition (true) when true;
 
 Start RoleProhibition (Role_Prohibition) when IsSourceType(RoleType); 
 Add RoleProhibition (Role_Prohibition) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); 
 Reconnect RoleProhibition (Role_Prohibition) when IsSourceType(RoleType) and !SourceEqualsTarget() and SourceEqualsTargetType(); 
+Create RoleProhibition (true) when true;
\ No newline at end of file
diff --git a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleEquivalencePattern.java b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleEquivalencePattern.java
index 1b72dbdf..8cd64938 100644
--- a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleEquivalencePattern.java
+++ b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleEquivalencePattern.java
@@ -5,7 +5,6 @@ import java.util.List;
 import org.eclipse.graphiti.features.context.IAddConnectionContext;
 import org.eclipse.graphiti.features.context.IAddContext;
 import org.eclipse.graphiti.features.context.ICreateConnectionContext;
-import org.eclipse.graphiti.features.context.IReconnectionContext;
 import org.eclipse.graphiti.mm.algorithms.Polygon;
 import org.eclipse.graphiti.mm.algorithms.Polyline;
 import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
@@ -42,19 +41,13 @@ public class RoleEquivalencePattern extends AbstractRoleConstraintPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.CONSTRAINTS_CATEGORY,
 			ViewVisibility.COMPARTMENT_VIEW) {
 				@Override
 				public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 					return framedFeatureNames.contains("Role_Equivalence");
-			}	};*/
-			
-			private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-					PaletteCategory.CONSTRAINTS_CATEGORY,
-					ViewVisibility.ALL_VIEWS) {};
-			
+			}	};			
 		
 	/**
 	 * Class constructor
diff --git a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleImplicationPattern.java b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleImplicationPattern.java
index 994a8397..798c52f3 100644
--- a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleImplicationPattern.java
+++ b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleImplicationPattern.java
@@ -41,7 +41,6 @@ public class RoleImplicationPattern extends AbstractRoleConstraintPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.CONSTRAINTS_CATEGORY,
 			ViewVisibility.COMPARTMENT_VIEW) {
@@ -49,10 +48,6 @@ public class RoleImplicationPattern extends AbstractRoleConstraintPattern {
 				public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 					return framedFeatureNames.contains("Role_Implication");
 			}	};
-			*/
-			private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-					PaletteCategory.CONSTRAINTS_CATEGORY,
-					ViewVisibility.ALL_VIEWS) {};
 	
 	/**
 	 * Class constructor
diff --git a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleProhibitionPattern.java b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleProhibitionPattern.java
index a4405944..d76fee04 100644
--- a/org.framed.iorm.ui/modules/roletype/role_constraints/RoleProhibitionPattern.java
+++ b/org.framed.iorm.ui/modules/roletype/role_constraints/RoleProhibitionPattern.java
@@ -40,7 +40,6 @@ public class RoleProhibitionPattern extends AbstractRoleConstraintPattern {
 	/**
 	 * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
 	 */
-	/*
 	private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
 			PaletteCategory.CONSTRAINTS_CATEGORY,
 			ViewVisibility.COMPARTMENT_VIEW) {
@@ -48,10 +47,6 @@ public class RoleProhibitionPattern extends AbstractRoleConstraintPattern {
 				public boolean featureExpression(List<String> framedFeatureNames, PaletteView paletteView) {
 					return framedFeatureNames.contains("Role_Prohibition");
 			}	};
-			*/
-			private final FeaturePaletteDescriptor spec_FPD = new FeaturePaletteDescriptor(
-					PaletteCategory.CONSTRAINTS_CATEGORY,
-					ViewVisibility.ALL_VIEWS) {};
 	
 	/**
 	 * Class constructor
diff --git a/org.framed.iorm.ui/src/org/framed/iorm/ui/editPolicy/ConstraintRuleVisitor.java b/org.framed.iorm.ui/src/org/framed/iorm/ui/editPolicy/ConstraintRuleVisitor.java
index 50eb4b43..ed4a492a 100644
--- a/org.framed.iorm.ui/src/org/framed/iorm/ui/editPolicy/ConstraintRuleVisitor.java
+++ b/org.framed.iorm.ui/src/org/framed/iorm/ui/editPolicy/ConstraintRuleVisitor.java
@@ -15,7 +15,6 @@ import org.eclipse.graphiti.mm.pictograms.Shape;
 import org.framed.iorm.model.ModelElement;
 import org.framed.iorm.model.Type;
 import org.framed.iorm.ui.UIUtil;
-import org.framed.iorm.ui.exceptions.InvalidTypeOfEditorInputException;
 import org.framed.iorm.ui.exceptions.NoDiagramFoundException;
 
 import editpolicymodel.AndConstraintRule;
@@ -50,12 +49,9 @@ public class ConstraintRuleVisitor {
 	@SuppressWarnings("unused")
 	private Type type;
 
-	private Diagram diagram;
-
 	public ConstraintRuleVisitor(Object context, Type type, Diagram diagram) {
 		this.context = context;
 		this.type = type;
-		this.diagram = diagram;
 	}
 
 	public Diagram getDiagramWithName(String name, Diagram rootDiagram) {
-- 
GitLab