From a1c18c6946ccbbd0f49fc43b9eabf66fb82eefb1 Mon Sep 17 00:00:00 2001
From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr>
Date: Thu, 14 Jan 2021 13:54:48 +0100
Subject: [PATCH] Removing links between actors and use case for specialization

---
 modeling/AVATAR/CoffeeMachine_Avatar.xml            |  4 ++--
 src/main/java/ui/ucd/TGConnectingPointActorUCD.java | 11 ++++++++---
 src/main/java/ui/ucd/TGConnectingPointUCD.java      |  5 +++++
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/modeling/AVATAR/CoffeeMachine_Avatar.xml b/modeling/AVATAR/CoffeeMachine_Avatar.xml
index 02b72ee873..84ce324700 100644
--- a/modeling/AVATAR/CoffeeMachine_Avatar.xml
+++ b/modeling/AVATAR/CoffeeMachine_Avatar.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<TURTLEGMODELING version="1.0beta" ANIMATE_INTERACTIVE_SIMULATION="false" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="false" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="1" LAST_SELECTED_SUB_TAB="1">
+<TURTLEGMODELING version="1.0beta" ANIMATE_INTERACTIVE_SIMULATION="false" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="false" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="1" LAST_SELECTED_SUB_TAB="0">
 
 <Modeling type="Avatar Requirement" nameTab="AVATAR Requirements" >
 <AvatarRDPanel name="AVATAR RD" minX="10" maxX="1900" minY="10" maxY="1400" zoom="1.0" >
@@ -1279,7 +1279,7 @@
 <MainCode value="}"/>
 <Optimized value="true" />
 <considerTimingOperators value="true" />
-<Validated value="Wallet;CoffeeMachine;TeaButton;CoffeeButton;" />
+<Validated value="" />
 <Ignored value="" />
 
 <CONNECTOR type="5002" id="695" >
diff --git a/src/main/java/ui/ucd/TGConnectingPointActorUCD.java b/src/main/java/ui/ucd/TGConnectingPointActorUCD.java
index 2a28a1938a..a89e72c56d 100755
--- a/src/main/java/ui/ucd/TGConnectingPointActorUCD.java
+++ b/src/main/java/ui/ucd/TGConnectingPointActorUCD.java
@@ -49,6 +49,7 @@ import ui.TGConnectingPointWidthHeight;
  * Definition of connecting points on which connectors of actors found in use case diagrams can be connected
  * Creation: 18/02/2005
  * @version 1.0 18/02/2005
+ * @version 2.0 14/01/2020
  * @author Ludovic APVRILLE
  */
 public class TGConnectingPointActorUCD extends TGConnectingPointWidthHeight{
@@ -72,13 +73,17 @@ public class TGConnectingPointActorUCD extends TGConnectingPointWidthHeight{
 
         if (outPoint != null) {
 
+
+
+
+            if ((outPoint.getFather() instanceof UCDUseCase)  && (type == TGComponentManager.CONNECTOR_SPECIA_UCD)) {
+                return false;
+            }
+
             if (type == TGComponentManager.CONNECTOR_SPECIA_UCD) {
                 return true;
             }
 
-            if ((outPoint.getFather() instanceof UCDUseCase) && (getFather() instanceof UCDUseCase)) {
-                return false;
-            }
             if ((outPoint.getFather() instanceof UCDActor) && (getFather() instanceof UCDActor)) {
                 return false;
             }
diff --git a/src/main/java/ui/ucd/TGConnectingPointUCD.java b/src/main/java/ui/ucd/TGConnectingPointUCD.java
index 0c1ee77abe..dcf35f488b 100755
--- a/src/main/java/ui/ucd/TGConnectingPointUCD.java
+++ b/src/main/java/ui/ucd/TGConnectingPointUCD.java
@@ -50,6 +50,7 @@ import ui.TGConnectingPointWidthHeight;
  * Definition of connecting points on which connectors of use case diagrams can be connected
  * Creation: 18/02/2005
  * @version 1.0 18/02/2005
+ * @version 2.0 14/01/2021
  * @author Ludovic APVRILLE
  */
 public class TGConnectingPointUCD extends  TGConnectingPointWidthHeight{
@@ -102,6 +103,10 @@ public class TGConnectingPointUCD extends  TGConnectingPointWidthHeight{
                 return false;
             }
 
+            if ((outPoint.getFather() instanceof UCDActor)  && (type == TGComponentManager.CONNECTOR_SPECIA_UCD) && !((getFather() instanceof UCDActor))) {
+                return false;
+            }
+
         }
 
 	    return isCompatibleWith(type);
-- 
GitLab