*******************************************************************************/
package org.simantics.browsing.ui.graph.impl;
-import java.util.function.Consumer;
-
import org.simantics.browsing.ui.BuiltinKeys;
import org.simantics.browsing.ui.DataSource;
import org.simantics.browsing.ui.NodeContext;
import org.simantics.browsing.ui.common.viewpoints.ViewpointStub;
import org.simantics.browsing.ui.content.Viewpoint;
import org.simantics.browsing.ui.graph.impl.request.ResourceQuery;
+import org.simantics.db.AsyncReadGraph;
import org.simantics.db.ReadGraph;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.procedure.Listener;
public NodeContext[] getChildren() {
if (children == Viewpoint.PENDING_CHILDREN) {
- DataSource<ReadGraph> source = updater.getDataSource(ReadGraph.class);
+ DataSource<AsyncReadGraph> source = updater.getDataSource(AsyncReadGraph.class);
final Listener<NodeContext[]> childProcedure = createListener();
- source.schedule(new Consumer<ReadGraph>() {
- @Override
- public void accept(ReadGraph source) {
- source.asyncRequest(childQuery, childProcedure);
- }
- });
+ source.schedule(graph -> graph.asyncRequest(childQuery, childProcedure));
}
return children;