Commit 27d419b9 authored by yoogx's avatar yoogx
Browse files

* Handle case issues when selecting root system

        For issue #36
parent fe56d1cc
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
with Errors; with Errors;
with Locations; with Locations;
with Utils;
with Ocarina.Namet; with Ocarina.Namet;
with Ocarina.Output; with Ocarina.Output;
...@@ -55,6 +56,7 @@ package body Ocarina.Instances is ...@@ -55,6 +56,7 @@ package body Ocarina.Instances is
use Errors; use Errors;
use Locations; use Locations;
use Utils;
use Ocarina.Namet; use Ocarina.Namet;
use Ocarina.Output; use Ocarina.Output;
...@@ -174,10 +176,11 @@ package body Ocarina.Instances is ...@@ -174,10 +176,11 @@ package body Ocarina.Instances is
List_Node := Root_Systems.First; List_Node := Root_Systems.First;
while Present (List_Node) loop while Present (List_Node) loop
exit when exit when
(ATE.Get_Name_Of_Entity (List_Node, False) = Root_System_Name (To_Lower (ATE.Get_Name_Of_Entity (List_Node, False))
= To_Lower (Root_System_Name)
or else or else
ATE.Get_Name_Of_Entity (List_Node, False, True) To_Lower (ATE.Get_Name_Of_Entity (List_Node, False, True))
= Root_System_Name); = To_Lower (Root_System_Name));
List_Node := ATN.Next_Entity (List_Node); List_Node := ATN.Next_Entity (List_Node);
end loop; end loop;
...@@ -211,11 +214,15 @@ package body Ocarina.Instances is ...@@ -211,11 +214,15 @@ package body Ocarina.Instances is
if Root_System_Name /= No_Name if Root_System_Name /= No_Name
and then and then
ATE.Get_Name_Of_Entity (Root_System, False) /= To_Lower (ATE.Get_Name_Of_Entity (Root_System, False)) /=
Root_System_Name To_Lower (Root_System_Name)
and then
To_Lower (ATE.Get_Name_Of_Entity (Root_System, False, True)) /=
To_Lower (Root_System_Name)
then then
Error_Name (1) := Root_System_Name; Error_Name (1) := Root_System_Name;
Error_Name (2) := ATE.Get_Name_Of_Entity (Root_System); Error_Name (2) := ATE.Get_Name_Of_Entity
(Root_System, False, True);
DE ("system % is not a root system, use %"); DE ("system % is not a root system, use %");
Root_System := No_Node; Root_System := No_Node;
Exit_On_Error (True, "Cannot instantiate AADL model"); Exit_On_Error (True, "Cannot instantiate AADL model");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment