From: jsimomaa Date: Fri, 22 Aug 2014 08:07:49 +0000 (+0000) Subject: refs #5206 X-Git-Tag: v1.29.0~222 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=edc028e8d9d6ab7cf824bbedb191082ff5388a6c;p=simantics%2Fsysdyn.git refs #5206 Adding more UndoPoints to AssignIC class git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30116 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/AssignIC.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/AssignIC.java index a84ec550..16bb242b 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/AssignIC.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/AssignIC.java @@ -34,6 +34,7 @@ import org.simantics.db.common.request.WriteRequest; import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.request.PossibleModel; +import org.simantics.db.layer0.util.Layer0Utils; import org.simantics.layer0.Layer0; import org.simantics.modeling.ui.Activator; import org.simantics.sysdyn.SysdynResource; @@ -99,22 +100,17 @@ public class AssignIC extends AbstractHandler { @Override public void perform(WriteGraph graph) throws DatabaseException { - + graph.markUndoPoint(); SysdynResource SYSDYN = SysdynResource.getInstance(graph); graph.deny(experiment, SYSDYN.Experiment_ic); graph.claim(experiment, SYSDYN.Experiment_ic, ic); - + Layer0Utils.addCommentMetadata(graph, "Assigned new IC " + NameUtils.getSafeName(graph, ic) + " to experiment " + NameUtils.getSafeLabel(graph, experiment)); } - }); - } catch (DatabaseException e) { - + e.printStackTrace(); } - return null; - } - }