generateProposition uses component type name 09/2909/1
authorJani Mäkinen <jani.makinen@semantum.fi>
Tue, 28 May 2019 09:36:07 +0000 (12:36 +0300)
committerJani Mäkinen <jani.makinen@semantum.fi>
Tue, 28 May 2019 09:56:22 +0000 (12:56 +0300)
gitlab #299

Change-Id: Iee27e31d6f8b954ffedc6f31817669dd06ba0a9d

bundles/org.simantics.modeling/src/org/simantics/modeling/services/ComponentNamingUtil.java

index fc629bdb0cc99bcdb71cf17ebb03c1d568f47375..387b3a41a98db39dc506107d9932871f33431dfb 100644 (file)
@@ -189,7 +189,7 @@ public final class ComponentNamingUtil {
         if (containerGeneratedNamePrefix != null)
             proposition.append(containerGeneratedNamePrefix);
         String componentPrefix = graph.getPossibleRelatedValue(componentType, L0X.HasGeneratedNamePrefix, Bindings.STRING);
-        if (componentPrefix == null) {
+        if (componentPrefix == null || "".equals(componentPrefix)) {
             Layer0 L0 = Layer0.getInstance(graph);
             componentPrefix = graph.getPossibleRelatedValue(componentType, L0.HasName);
             if (componentPrefix == null)