import org.simantics.sysdyn.ui.elements.ValveFactory.ValveSceneGraph;\r
import org.simantics.sysdyn.ui.elements.connections.ConnectionClasses;\r
import org.simantics.ui.SimanticsUI;\r
-import org.simantics.utils.datastructures.Callback;\r
import org.simantics.utils.datastructures.Pair;\r
import org.simantics.utils.ui.ErrorLogger;\r
import org.simantics.utils.ui.ExceptionUtils;\r
public void perform(WriteGraph graph) throws DatabaseException {\r
builder.create(graph, judgment, controlPoints, startTerminal, endTerminal);\r
}\r
- }, new Callback<DatabaseException>() {\r
- @Override\r
- public void run(DatabaseException parameter) {\r
- if (parameter != null)\r
- ExceptionUtils.logAndShowError(parameter);\r
- }\r
+ }, e -> {\r
+ if (e != null)\r
+ ExceptionUtils.logAndShowError(e);\r
});\r
- } \r
+ }\r
}\r
List<Resource> loopItems = getAllLoopItems();\r
\r
// Get the diagram where this loop is.\r
- RTreeNode diagramNode = (RTreeNode)NodeUtil.getNearestParentOfType(this, RTreeNode.class);\r
+ RTreeNode diagramNode = (RTreeNode)NodeUtil.getPossibleNearestParentOfType(this, RTreeNode.class);\r
if (diagramNode == null)\r
return;\r
\r
import org.simantics.db.request.ExternalRead;\r
import org.simantics.db.service.QueryControl;\r
import org.simantics.utils.ObjectUtils;\r
-import org.simantics.utils.datastructures.Callback;\r
\r
public class VariableValueSubscription<T> {\r
\r
requests.add(read);\r
graph.getService(QueryControl.class).gc(graph, requests);\r
}\r
- }, new Callback<DatabaseException>() {\r
- @Override\r
- public void run(DatabaseException e) {\r
- if (e != null)\r
- e.printStackTrace();\r
- }\r
+ }, e -> {\r
+ if (e != null)\r
+ e.printStackTrace();\r
});\r
}\r
\r