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%2FSCLTypeUtils.java;h=c94b1be1b2dbaeb43c96b934d551024bb5d2be8a;hp=d3c7310e4ccf23c47350224f99fc0b3a45574082;hb=1dfeb7d5c49b1391cd9d877e1eddab18995cb151;hpb=c13c4179bda758e77fe1f2032d3c4268bb9e3120 diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLTypeUtils.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLTypeUtils.java index d3c7310e4..c94b1be1b 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLTypeUtils.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLTypeUtils.java @@ -16,8 +16,11 @@ import org.simantics.scl.compiler.types.TCon; import org.simantics.scl.compiler.types.Type; import org.simantics.scl.compiler.types.Types; import org.simantics.scl.compiler.types.kinds.Kinds; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SCLTypeUtils { + private static final Logger LOGGER = LoggerFactory.getLogger(SCLTypeUtils.class); private static final THashMap TYPE_MAP = new THashMap(); private static void add(TCon type) { @@ -68,7 +71,7 @@ public class SCLTypeUtils { public static Type getType(String typeText) { Type type = TYPE_MAP.get(typeText); if(type == null) { - System.err.println("SCLTypeUtils.getType cannot transform '" + typeText + "' to type. Returns a as default."); + LOGGER.warn("SCLTypeUtils.getType cannot transform '" + typeText + "' to type. Returns a as default."); return Types.var(Kinds.STAR); } return type; @@ -92,7 +95,7 @@ public class SCLTypeUtils { else if(dataType instanceof ArrayType) return Types.list(getType(((ArrayType)dataType).componentType)); else { - System.err.println("SCLTypeUtils.getType cannot transform data type '" + dataType + "' to type. Returns a as default."); + LOGGER.warn("SCLTypeUtils.getType cannot transform data type '" + dataType + "' to type. Returns a as default."); return Types.var(Kinds.STAR); } } @@ -103,7 +106,7 @@ public class SCLTypeUtils { else if(propertyInfo.requiredDatatype != null) return getType(propertyInfo.requiredDatatype); else { - System.err.println(propertyInfo.name + " doesn't have type information. Returns a as default."); + LOGGER.warn(propertyInfo.name + " doesn't have type information. Returns a as default."); return Types.var(Kinds.STAR); } }