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%2Frules%2FMappedModelingRules.java;h=21a435f4ab134aa26d920d93241e113badce0487;hp=a47a1b63f580a80fc94b389d2557ee50b9238c94;hb=1dfeb7d5c49b1391cd9d877e1eddab18995cb151;hpb=c13c4179bda758e77fe1f2032d3c4268bb9e3120 diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/rules/MappedModelingRules.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/rules/MappedModelingRules.java index a47a1b63f..21a435f4a 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/rules/MappedModelingRules.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/rules/MappedModelingRules.java @@ -36,9 +36,12 @@ import org.simantics.structural2.modelingRules.IAttachmentRelationMap; import org.simantics.structural2.modelingRules.IConnectionPoint; import org.simantics.structural2.modelingRules.IModelingRules; import org.simantics.structural2.modelingRules.Policy; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MappedModelingRules extends AbstractModelingRules { + private static final Logger LOGGER = LoggerFactory.getLogger(MappedModelingRules.class); IModelingRules baseRules; IMapping mapping; @@ -69,7 +72,7 @@ public class MappedModelingRules extends AbstractModelingRules { ModelingResources MOD = ModelingResources.getInstance(g); if(Policy.DEBUG_STANDARD_MODELING_RULES) - System.out.println("setConnectionType(" + NameUtils.getSafeName(g, connection) + ", " + NameUtils.getSafeName(g, connectionType) + ")"); + LOGGER.info("setConnectionType(" + NameUtils.getSafeName(g, connection) + ", " + NameUtils.getSafeName(g, connectionType) + ")"); RelatedDiagramConnections rdc = new RelatedDiagramConnections(g); rdc.addConnection(connection); @@ -133,12 +136,12 @@ public class MappedModelingRules extends AbstractModelingRules { if(cp == null) throw new IllegalArgumentException("Null connection point encountered."); if(Policy.DEBUG_STANDARD_MODELING_RULES) - System.out.println("Mapping CP: " + cp.toString(g)); + LOGGER.info("Mapping CP: " + cp.toString(g)); int mcps = mapping.mapToConnectionPoints(g, cp, mappedConnectionPoints); if(mcps > 0) { if(Policy.DEBUG_STANDARD_MODELING_RULES) for (IConnectionPoint mcpt : mappedConnectionPoints.subList(mappedConnectionPoints.size()-mcps, mappedConnectionPoints.size())) - System.out.println("Mapped CP: " + mcpt.toString(g)); + LOGGER.info("Mapped CP: " + mcpt.toString(g)); } else { if(cp instanceof CPTerminal) { // TODO move this logic elsewhere @@ -211,7 +214,7 @@ public class MappedModelingRules extends AbstractModelingRules { Resource connection) throws DatabaseException { Resource mappedConnection = mapping.mapConnection(g, connection); if(mappedConnection == null) - System.err.println("Connection mapped from " + NameUtils.getSafeName(g, connection, true) + " is null"); + LOGGER.warn("Connection mapped from " + NameUtils.getSafeName(g, connection, true) + " is null"); return new MappedAttachmentRelationMap( baseRules.getAttachmentRelations(g, mappedConnection) );