From 76e57469527a56bf5fe582d1ed2ef150751f2ed9 Mon Sep 17 00:00:00 2001 From: tobi <matteo.bertolino@telecom-paristech.fr> Date: Thu, 6 Jul 2017 17:56:00 +0200 Subject: [PATCH] Error when a task of a non-existing class is mapped --- src/main/java/ui/GTMLModeling.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/ui/GTMLModeling.java b/src/main/java/ui/GTMLModeling.java index c1159614b3..cd96637882 100755 --- a/src/main/java/ui/GTMLModeling.java +++ b/src/main/java/ui/GTMLModeling.java @@ -1,7 +1,8 @@ -/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille, Andrea Enrici +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille, Andrea Enrici, Matteo Bertolino * * ludovic.apvrille AT telecom-paristech.fr * andrea.enrici AT telecom-paristech.fr + * matteo.bertolino AT telecom-paristech.fr * * This software is a computer program whose purpose is to allow the * edition of TURTLE analysis, design and deployment diagrams, to @@ -3482,7 +3483,12 @@ public class GTMLModeling { node.addMECToHwExecutionNode( mec ); map.addTaskToHwExecutionNode(task, (HwExecutionNode)node); } else { - TraceManager.addDev("Null task"); + TraceManager.addDev("Null task. Raising an error"); + String msg = "The task named " + artifact.getTaskName() + " was not found"; + UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, msg); + ce.setTDiagramPanel(tmlap.tmlap); + ce.setTGComponent(tgc); + checkingErrors.add(ce); } } } -- GitLab