X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Ftypicals%2FTypicalDiagramTemplateListener.java;h=71ddc664d40f260b25bed85cacce04f192d84b30;hp=18ae271374bc1c236cb9d5f1eaaaf28be59ddafa;hb=627664d06302d454ea3b3fe14d13bb5ab739d666;hpb=eae2657463e387cb764e7e5780d5c56f5311c0af 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); }); }