]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
(refs #7457) Make default ComponentType name prefix an assertion 97/897/4
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Thu, 31 Aug 2017 08:06:08 +0000 (11:06 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 31 Aug 2017 10:53:42 +0000 (13:53 +0300)
Change-Id: I245960d29a5ac7a27af568174f5d62669382ad68

bundles/org.simantics.modeling/src/org/simantics/modeling/NewComponentType.java
bundles/org.simantics.structural.ontology/graph/Structural.pgraph

index 813b6c3c15538253097823fe15aa45f675517dc9..f187762cacba3a3df813a6fc5975e2444c7c994e 100644 (file)
@@ -42,7 +42,8 @@ public class NewComponentType {
         String defaultName = graph.getRelatedValue(indexRoot, MOD.StructuralModel_HasDefaultComponentTypeName, Bindings.STRING);
         String name = NameUtils.findFreshName(graph, defaultName, library);
         graph.claimLiteral(componentType, L0.HasName, name + "@1");
-        graph.claimLiteral(componentType, L0X.HasGeneratedNamePrefix, "");
+        // #7457: replaced by assertion in STR.ComponentType
+        //graph.claimLiteral(componentType, L0X.HasGeneratedNamePrefix, "");
 
         // Substructure
         Resource substructureType = graph.getSingleObject(indexRoot, MOD.StructuralModel_HasComponentTypeSubstructureType);
index eba1f52fe6e56deb0a1b0853e31642cd1e7f6c6d..aa31879c524944a994d17f72065de7d328036170 100644 (file)
@@ -23,6 +23,7 @@ STR.ComponentType <T L0.Type
     >-- STR.ComponentType.HasDefaultPropertyRelationType <R L0.IsRelatedTo
     >-- STR.ComponentType.HasDefaultPropertyValueType <R L0.IsRelatedTo
     >-- STR.ComponentType.HasDefaultMonitorValueType --> STR.MonitorValueType <R L0.IsRelatedTo
+    @L0.assert L0X.HasGeneratedNamePrefix ""
 
 STR.MonitorValueType <T L0.Entity
 STR.MonitorValue <T L0.SCLValue : STR.MonitorValueType