import java.util.ArrayList;\r
import java.util.Collection;\r
import java.util.Collections;\r
+import java.util.function.Consumer;\r
\r
import org.eclipse.swt.widgets.Display;\r
import org.eclipse.ui.IEditorPart;\r
import org.simantics.sysdyn.SysdynResource;\r
import org.simantics.ui.utils.ResourceAdaptionUtils;\r
import org.simantics.ui.workbench.editor.AbstractResourceEditorAdapter;\r
-import org.simantics.utils.datastructures.Callback;\r
import org.simantics.utils.threads.ThreadUtils;\r
import org.simantics.utils.ui.AdaptionUtils;\r
\r
final Collection<Object> selectedObjects = findElementObjects(g, module);\r
\r
result.add(\r
- NavigateToTarget.editorActivator(EDITOR_ID, diagram, model, rvi, new Callback<IEditorPart>() {\r
+ NavigateToTarget.editorActivator(EDITOR_ID, diagram, model, rvi, new Consumer<IEditorPart>() {\r
@Override\r
- public void run(IEditorPart part) {\r
+ public void accept(IEditorPart part) {\r
final ICanvasContext openedCanvas = (ICanvasContext) part.getAdapter(ICanvasContext.class);\r
assert openedCanvas != null;\r
// CanvasContext-wide denial of initial zoom-to-fit on diagram open.\r
import java.awt.geom.AffineTransform;\r
import java.awt.geom.Point2D;\r
import java.util.Set;\r
+import java.util.function.Consumer;\r
\r
import org.simantics.db.Resource;\r
import org.simantics.db.common.request.Queries;\r
import org.simantics.sysdyn.ui.elements.SysdynElementHints;\r
import org.simantics.sysdyn.ui.elements.ValveFactory;\r
import org.simantics.ui.SimanticsUI;\r
-import org.simantics.utils.datastructures.Callback;\r
import org.simantics.utils.ui.ExceptionUtils;\r
\r
public class CreateVariablesShortcutParticipant extends AbstractDiagramParticipant {\r
\r
\r
private void createVariableOnDiagram(IDiagram d) {\r
- DiagramUtils.mutateDiagram(d, new Callback<DiagramMutator>() {\r
+ DiagramUtils.mutateDiagram(d, new Consumer<DiagramMutator>() {\r
@Override\r
- public void run(DiagramMutator m) {\r
+ public void accept(DiagramMutator m) {\r
\r
Resource r;\r
try {\r