X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.event%2Fsrc%2Forg%2Fsimantics%2Fevent%2Fview%2Fhandler%2FMenuActions.java;h=9b125ed446342deb269dd77ec5b2c02517ba9074;hp=ddd70fb7fa6d46add38bf7a0b99c6268e20a15d1;hb=bd5bc6e45f700e755b61bd112631796631330ecb;hpb=7684baeb8bc7963700676af20db6f4a860581e46 diff --git a/bundles/org.simantics.event/src/org/simantics/event/view/handler/MenuActions.java b/bundles/org.simantics.event/src/org/simantics/event/view/handler/MenuActions.java index ddd70fb7f..9b125ed44 100644 --- a/bundles/org.simantics.event/src/org/simantics/event/view/handler/MenuActions.java +++ b/bundles/org.simantics.event/src/org/simantics/event/view/handler/MenuActions.java @@ -24,6 +24,7 @@ import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.SelectionHints; import org.simantics.event.Activator; import org.simantics.event.ontology.EventResource; +import org.simantics.event.util.EventUtils; import org.simantics.ui.contribution.DynamicMenuContribution; import org.simantics.ui.workbench.action.PerformDefaultAction; import org.simantics.utils.ui.ISelectionUtils; @@ -147,13 +148,17 @@ public class MenuActions extends DynamicMenuContribution { } private IAction hideAction(List input) { - return tagAction("Hide", Activator.HIDE_ICON, EventResource.URIs.Hidden, true, input); + return contentChangingTagAction("Hide", Activator.HIDE_ICON, EventResource.URIs.Hidden, true, input); } private IAction tagAction(String label, ImageDescriptor image, String tagURI, boolean tag, List input) { return new TagAction(label, image, VG_EXPERIMENTS, tagURI, tag, input); } + private IAction contentChangingTagAction(String label, ImageDescriptor image, String tagURI, boolean tag, List input) { + return new ContentChangingTagAction(label, image, VG_EXPERIMENTS, tagURI, tag, input); + } + private IAction setBaseline(Resource eventLog, Resource event) { return new SetBaseline(VG_EXPERIMENTS, eventLog, event); } @@ -169,6 +174,17 @@ public class MenuActions extends DynamicMenuContribution { return new PerformDefaultAction(title, null, input); } + private static class ContentChangingTagAction extends TagAction { + public ContentChangingTagAction(String label, ImageDescriptor image, String virtualGraphId, String tagURI, boolean tag, List input) { + super(label, image, virtualGraphId, tagURI, tag, input); + } + + @Override + public void postTagWrite(WriteGraph graph) throws DatabaseException { + EventUtils.bumpModificationCounter(graph, resources); + } + } + private static class ToClipboardAction extends Action { private String text;