import org.simantics.db.common.utils.NameUtils;\r
import org.simantics.db.exception.DatabaseException;\r
import org.simantics.db.layer0.request.PossibleModel;\r
+import org.simantics.db.layer0.util.Layer0Utils;\r
import org.simantics.layer0.Layer0;\r
import org.simantics.modeling.ui.Activator;\r
import org.simantics.sysdyn.SysdynResource;\r
\r
@Override\r
public void perform(WriteGraph graph) throws DatabaseException {\r
-\r
+ graph.markUndoPoint();\r
SysdynResource SYSDYN = SysdynResource.getInstance(graph);\r
\r
graph.deny(experiment, SYSDYN.Experiment_ic);\r
graph.claim(experiment, SYSDYN.Experiment_ic, ic);\r
-\r
+ Layer0Utils.addCommentMetadata(graph, "Assigned new IC " + NameUtils.getSafeName(graph, ic) + " to experiment " + NameUtils.getSafeLabel(graph, experiment));\r
}\r
-\r
});\r
-\r
} catch (DatabaseException e) {\r
-\r
+ e.printStackTrace();\r
}\r
-\r
return null;\r
- \r
}\r
-\r
}\r