]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
unify naming conventions for new model and model import 44/4344/2
authorJani Mäkinen <jani.makinen@semantum.fi>
Fri, 17 Jul 2020 09:26:48 +0000 (12:26 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 10 Aug 2020 07:14:02 +0000 (07:14 +0000)
github #76

Change-Id: I711e27d188a1b7acb74162653c2d8b286adccb26

bundles/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/ModelUtils.java

index 96c3750751b99953dde753d9dec5e83fe66efb54..e9379fa43e29f5b9082166b402c153329daecdd6 100644 (file)
@@ -68,7 +68,7 @@ public class ModelUtils {
             ModelingUtils mu = new ModelingUtils(g);
             DocumentResource DOC = DocumentResource.getInstance(g);
 
-            String modelName = NameUtils.findFreshName(g, "Model", library, l0.ConsistsOf, "%s%d");
+            String modelName = NameUtils.findFreshEscapedName(g, "Model", library, l0.ConsistsOf);
 
             Resource project = Simantics.getProject().get();
             Resource model = GraphUtils.create2(g,