From b325eb5d869c2e2b2672dc82a13ca56c9ccacc39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Thu, 31 Aug 2017 11:06:08 +0300 Subject: [PATCH] (refs #7457) Make default ComponentType name prefix an assertion Change-Id: I245960d29a5ac7a27af568174f5d62669382ad68 --- .../src/org/simantics/modeling/NewComponentType.java | 3 ++- .../org.simantics.structural.ontology/graph/Structural.pgraph | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/NewComponentType.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/NewComponentType.java index 813b6c3c1..f187762ca 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/NewComponentType.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/NewComponentType.java @@ -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); diff --git a/bundles/org.simantics.structural.ontology/graph/Structural.pgraph b/bundles/org.simantics.structural.ontology/graph/Structural.pgraph index eba1f52fe..aa31879c5 100644 --- a/bundles/org.simantics.structural.ontology/graph/Structural.pgraph +++ b/bundles/org.simantics.structural.ontology/graph/Structural.pgraph @@ -23,6 +23,7 @@ STR.ComponentType -- STR.ComponentType.HasDefaultPropertyRelationType -- STR.ComponentType.HasDefaultPropertyValueType -- STR.ComponentType.HasDefaultMonitorValueType --> STR.MonitorValueType