Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/revision/bundles/org.eclipse.papyrus.revisiontool/src/org/eclipse/papyrus/revision/tool/handlers/SaveSnapshotRevision.java')
-rwxr-xr-xplugins/revision/bundles/org.eclipse.papyrus.revisiontool/src/org/eclipse/papyrus/revision/tool/handlers/SaveSnapshotRevision.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/plugins/revision/bundles/org.eclipse.papyrus.revisiontool/src/org/eclipse/papyrus/revision/tool/handlers/SaveSnapshotRevision.java b/plugins/revision/bundles/org.eclipse.papyrus.revisiontool/src/org/eclipse/papyrus/revision/tool/handlers/SaveSnapshotRevision.java
new file mode 100755
index 00000000..88aa2e5f
--- /dev/null
+++ b/plugins/revision/bundles/org.eclipse.papyrus.revisiontool/src/org/eclipse/papyrus/revision/tool/handlers/SaveSnapshotRevision.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2017 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.revision.tool.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.revision.tool.ui.ReviewsEditor;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ *
+ * This handler is used to save a EMF compare model.
+ *
+ */
+public class SaveSnapshotRevision extends RevisionAbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ IWorkbenchPart part=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("org.eclipse.papyrus.revisiontool.commentview");
+ if( part instanceof ReviewsEditor){
+
+ //((ReviewsEditor)part).getReviewResourceManager().saveAsEMFCompare();
+ //((ReviewsEditor)part).getReviewResourceManager().savediff();
+ }
+ return null;
+ }
+ @Override
+ public boolean isEnabled() {
+ IWorkbenchPart part=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("org.eclipse.papyrus.revisiontool.commentview");
+ if( part ==null){
+ return false;
+ }
+ return true;
+ }
+}

Back to the top