X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.model%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fmodel%2Fnodetypes%2FSpecialNodeType.java;h=8218bac41e2e23327e3a5fa83d0166efbbf5e618;hp=ddd6113ff57ca77ee6f0e08ca0a7f54ec4836ebf;hb=1dfeb7d5c49b1391cd9d877e1eddab18995cb151;hpb=c13c4179bda758e77fe1f2032d3c4268bb9e3120 diff --git a/bundles/org.simantics.browsing.ui.model/src/org/simantics/browsing/ui/model/nodetypes/SpecialNodeType.java b/bundles/org.simantics.browsing.ui.model/src/org/simantics/browsing/ui/model/nodetypes/SpecialNodeType.java index ddd6113ff..8218bac41 100644 --- a/bundles/org.simantics.browsing.ui.model/src/org/simantics/browsing/ui/model/nodetypes/SpecialNodeType.java +++ b/bundles/org.simantics.browsing.ui.model/src/org/simantics/browsing/ui/model/nodetypes/SpecialNodeType.java @@ -26,8 +26,13 @@ import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; import org.simantics.ui.selection.WorkbenchSelectionElement; import org.simantics.viewpoint.ontology.ViewpointResource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SpecialNodeType implements NodeType { + + private static final Logger LOGGER = LoggerFactory.getLogger(SpecialNodeType.class); + public Resource resource; Class contentType; @@ -55,17 +60,19 @@ public class SpecialNodeType implements NodeType { if (bundleId != null) { bundle = Platform.getBundle(bundleId); if (bundle == null) - System.err.println("Referenced bundle '" + bundleId + "' not found in platform."); + LOGGER.warn("Referenced bundle '" + bundleId + "' not found in platform."); } if (bundle != null) contentType = bundle.loadClass(contentTypeName); else contentType = Class.forName(contentTypeName); } catch (ClassNotFoundException e) { - System.err.println("Unknown content type " + contentTypeName); + LOGGER.error("Unknown content type {} - {}", contentTypeName, e.getMessage()); + if (LOGGER.isTraceEnabled()) + LOGGER.trace("Unknown content type {}", contentTypeName, e); } else - System.err.println("Content type is NULL."); + LOGGER.warn("Content type is NULL."); } return new SpecialNodeType(r, contentType); }