X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.spreadsheet.ui%2Fsrc%2Forg%2Fsimantics%2Fspreadsheet%2Fui%2FSheetFactory.java;h=7edd2e81661c80c741f8162074b9f56ac572d890;hb=922dcf7ab2d716a6d17e6224bc1a12b1196233aa;hp=9c1fc296a1cfcf9aaead4974f352319a2879c5dc;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SheetFactory.java b/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SheetFactory.java index 9c1fc296a..7edd2e816 100644 --- a/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SheetFactory.java +++ b/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SheetFactory.java @@ -11,6 +11,7 @@ package org.simantics.spreadsheet.ui; import java.awt.geom.AffineTransform; +import java.util.function.Consumer; import org.simantics.db.AsyncReadGraph; import org.simantics.db.ReadGraph; @@ -34,7 +35,6 @@ import org.simantics.operation.Layer0X; import org.simantics.scenegraph.INode; import org.simantics.spreadsheet.graph.GraphUI; import org.simantics.spreadsheet.resource.SpreadsheetResource; -import org.simantics.utils.datastructures.Callback; /** @@ -76,11 +76,11 @@ public class SheetFactory implements ElementFactory { } @Override - public void execute(AsyncReadGraph graph, final Resource sheet) { + public void execute(AsyncReadGraph g, final Resource sheet) { if (sheet != null) { - graph.asyncRequest(new ReadRequest() { + g.asyncRequest(new ReadRequest() { @Override public void run(ReadGraph graph) throws DatabaseException { @@ -117,10 +117,10 @@ public class SheetFactory implements ElementFactory { element.setHint(SheetClass.KEY_SHEET, sheet); element.setHint(SheetClass.KEY_RVI, rvi); - element.setHint(ElementHints.KEY_SG_CALLBACK, new Callback() { + element.setHint(ElementHints.KEY_SG_CALLBACK, new Consumer() { @Override - public void run(INode _node) { + public void accept(INode _node) { final SheetNode node = (SheetNode)_node; @@ -138,7 +138,7 @@ public class SheetFactory implements ElementFactory { // This is called too early as backend.load is // definitely not complete at this time, but right now that is // acceptable from the implementation point-of-view. - procedure.execute(graph, element); + procedure.execute(g, element); }