]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/ui/WorkbenchSelectionProvider.java
Logger fixes after merge commit:fdbe8762
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / ui / WorkbenchSelectionProvider.java
index aa50762782398a452ff6cb8116e61592d62d9d53..5bd73f97a463b74f0ecb4f84842ac454a903212d 100644 (file)
@@ -23,7 +23,6 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.SelectionChangedEvent;\r
 import org.eclipse.jface.viewers.StructuredSelection;\r
 import org.eclipse.ui.IWorkbenchPartSite;\r
-import org.simantics.Logger;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.diagram.elements.AdaptableImmutableProxyElement;\r
 import org.simantics.g2d.canvas.ICanvasContext;\r
@@ -35,10 +34,12 @@ import org.simantics.g2d.diagram.participant.Selection;
 import org.simantics.g2d.element.ElementHints;\r
 import org.simantics.g2d.element.IElement;\r
 import org.simantics.ui.selection.WorkbenchSelectionUtils;\r
-import org.simantics.utils.datastructures.hints.IHintObservable;\r
 import org.simantics.utils.datastructures.hints.IHintContext.Key;\r
+import org.simantics.utils.datastructures.hints.IHintObservable;\r
 import org.simantics.utils.threads.IThreadWorkQueue;\r
 import org.simantics.utils.threads.ThreadUtils;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
 \r
 /**\r
  * A canvas participant that listens to the #0 mouse selection and provides it\r
@@ -48,6 +49,8 @@ import org.simantics.utils.threads.ThreadUtils;
  */\r
 public class WorkbenchSelectionProvider extends AbstractCanvasParticipant implements IPostSelectionProvider, ElementJSON {\r
 \r
+    private static final Logger LOGGER = LoggerFactory.getLogger(WorkbenchSelectionProvider.class);\r
+\r
     private static final long                                 POST_SELECTION_DELAY = 300;\r
 \r
     @Dependency protected Selection selection;\r
@@ -216,7 +219,7 @@ public class WorkbenchSelectionProvider extends AbstractCanvasParticipant implem
         try {\r
             return Optional.ofNullable( WorkbenchSelectionUtils.getPossibleJSON(sel) );\r
         } catch (DatabaseException e) {\r
-            Logger.defaultLogError(e);\r
+            LOGGER.error("Unexpected failure while constructing JSON from element " + element, e);\r
             return Optional.empty();\r
         }\r
     }\r