]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
refs #6520
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 2 Jun 2016 15:15:31 +0000 (15:15 +0000)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 2 Feb 2017 12:01:34 +0000 (14:01 +0200)
git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@32834 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.interop/src/org/simantics/interop/browsing/INodeEvaluators.java

index cbd6900526ad2a2ad9a64837a61f25908b87f2df..4c8d0453a401f0cbac50730fca51a0e03a5b8359 100644 (file)
@@ -3,6 +3,8 @@ package org.simantics.interop.browsing;
 import java.util.Collection;\r
 import java.util.Collections;\r
 import java.util.Map;\r
+import java.util.function.Consumer;\r
+import java.util.function.Supplier;\r
 \r
 import org.eclipse.jface.resource.ImageDescriptor;\r
 import org.simantics.browsing.ui.BuiltinKeys;\r
@@ -31,8 +33,6 @@ import org.simantics.db.exception.DatabaseException;
 import org.simantics.modeling.ui.modelBrowser.model.IChildrenCallback;\r
 import org.simantics.modeling.ui.modelBrowser.model.IDisposable;\r
 import org.simantics.modeling.ui.modelBrowser.model.IUpdateable;\r
-import org.simantics.utils.datastructures.Callable;\r
-import org.simantics.utils.datastructures.Callback;\r
 \r
 \r
 public class INodeEvaluators {\r
@@ -49,7 +49,7 @@ public class INodeEvaluators {
 }\r
 \r
 abstract class BaseViewpointFactory implements ViewpointFactory {\r
-    protected abstract class VPB extends LazyViewpoint implements Callable<Boolean>, IChildrenCallback {\r
+    protected abstract class VPB extends LazyViewpoint implements Supplier<Boolean>, IChildrenCallback {\r
        PrimitiveQueryUpdater updater;\r
        \r
        public VPB(PrimitiveQueryUpdater updater, NodeContext context, ViewpointKey key) {\r
@@ -71,9 +71,9 @@ abstract class BaseViewpointFactory implements ViewpointFactory {
             // BaseViewpointFactory unique.\r
             return BaseViewpointFactory.this.getClass();\r
         }\r
-\r
+        \r
         @Override\r
-        public Boolean call() {\r
+        public Boolean get() {\r
             return Boolean.valueOf(updater.isDisposed());\r
         }\r
 \r
@@ -158,10 +158,11 @@ class NodeImagerFactory implements ImagerFactory {
 \r
         DataSource<ReadGraph> source = updater.getDataSource(ReadGraph.class);\r
 \r
-        source.schedule(new Callback<ReadGraph>() {\r
-            @Override\r
-            public void run(ReadGraph g) {\r
-                try {\r
+        source.schedule(new Consumer<ReadGraph>() {\r
+               \r
+               @Override\r
+               public void accept(ReadGraph g) {\r
+                   try {\r
                        INode node = (INode)context.getConstant(BuiltinKeys.INPUT);\r
                     ImageDescriptor descriptor = node.getImage(g);\r
                        result.setImage(descriptor);\r