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
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
}\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
// 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
\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