Explorar o código

Only add individual models if they are not there; don't jsut check globally

Yentl Van Tendeloo %!s(int64=9) %!d(string=hai) anos
pai
achega
17bf33ae26
Modificáronse 1 ficheiros con 9 adicións e 7 borrados
  1. 9 7
      bootstrap/metamodels.alc

+ 9 - 7
bootstrap/metamodels.alc

@@ -406,17 +406,19 @@ Element function initialize_bottom(location_bottom : String):
 	return ltm_bottom
 
 Element function create_metamodels():
-	if (bool_not(dict_in(dict_read(read_root(), "__hierarchy"), "models"))):
-		String location_SCD
-		String location_PN
-		String location_bottom
+	String location_SCD
+	String location_PN
+	String location_bottom
 
-		location_SCD = "models/SimpleClassDiagrams"
-		location_PN = "models/PetriNets"
-		location_bottom = "models/LTM_bottom"
+	location_SCD = "models/SimpleClassDiagrams"
+	location_PN = "models/PetriNets"
+	location_bottom = "models/LTM_bottom"
 
+	if (bool_not(dict_in(dict_read(dict_read(read_root(), "__hierarchy"), "models"), "SimpleClassDiagrams"))):
 		initialize_SCD(location_SCD)
+	if (bool_not(dict_in(dict_read(dict_read(read_root(), "__hierarchy"), "models"), "PetriNets"))):
 		initialize_PN(location_SCD, location_PN)
+	if (bool_not(dict_in(dict_read(dict_read(read_root(), "__hierarchy"), "models"), "LTM_bottom"))):
 		initialize_bottom(location_bottom)
 
 	return dict_read(dict_read(read_root(), "__hierarchy"), "models")