X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Ftypicals%2FTypicalDiagramTemplateListener.java;h=71ddc664d40f260b25bed85cacce04f192d84b30;hb=4e402f51b0e34d40c3f9d33a4bec7feffeb8d339;hp=18ae271374bc1c236cb9d5f1eaaaf28be59ddafa;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalDiagramTemplateListener.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalDiagramTemplateListener.java index 18ae27137..71ddc664d 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalDiagramTemplateListener.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalDiagramTemplateListener.java @@ -11,8 +11,6 @@ *******************************************************************************/ package org.simantics.modeling.typicals; -import gnu.trove.set.hash.THashSet; - import java.util.Map; import org.simantics.db.MetadataI; @@ -31,10 +29,11 @@ import org.simantics.diagram.stubs.DiagramResource; import org.simantics.layer0.Layer0; import org.simantics.modeling.ModelingResources; import org.simantics.structural.stubs.StructuralResource2; -import org.simantics.utils.datastructures.Callback; import org.simantics.utils.datastructures.MapSet; import org.simantics.utils.ui.ErrorLogger; +import gnu.trove.set.hash.THashSet; + /** * This listener needs to discover if changes are made to typical diagram * templates. @@ -119,12 +118,9 @@ public class TypicalDiagramTemplateListener extends GenericChangeListener changes = this.changedElementsByDiagram; this.changedElementsByDiagram = new MapSet.Hash(); - graph.asyncRequest(new SyncTypicalTemplatesToInstances(null, templates, changes), new Callback() { - @Override - public void run(DatabaseException parameter) { - if (parameter != null) - ErrorLogger.defaultLogError("Typical template diagram synchronization to instances failes, see exception for details.", parameter); - } + graph.asyncRequest(new SyncTypicalTemplatesToInstances(null, templates, changes), e -> { + if (e != null) + ErrorLogger.defaultLogError("Typical template diagram synchronization to instances failes, see exception for details.", e); }); }