X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2FNewComponentType.java;h=813b6c3c15538253097823fe15aa45f675517dc9;hp=920c30453f36d54f4befbb97f8115a392f67a21e;hb=2e21c89c81d449bcc2301b3cf3cce4f2cd403a60;hpb=edbb4df64407826271ee6423451401684e9cd68c 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 920c30453..813b6c3c1 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/NewComponentType.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/NewComponentType.java @@ -62,9 +62,12 @@ public class NewComponentType { Resource symbolDiagramType = graph.getPossibleObject(indexRoot, MOD.StructuralModel_HasSymbolDiagramType); if(symbolDiagramType == null) symbolDiagramType = DIA.Composite; - + + Resource symbolType = graph.getPossibleObject(indexRoot, MOD.StructuralModel_HasSymbolType); + if(symbolType == null) symbolType = DIA.DefinedElement; + // Symbol - Resource symbol = new ModelingUtils(graph).createSymbol2("Symbol", symbolDiagramType); + Resource symbol = new ModelingUtils(graph).createSymbol2("Symbol", symbolDiagramType, symbolType); graph.claim(componentType, MOD.ComponentTypeToSymbol, symbol); graph.claim(componentType, L0.ConsistsOf, symbol);