Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/CompareWithEachOtherAction.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/CompareWithEachOtherAction.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/CompareWithEachOtherAction.java b/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/CompareWithEachOtherAction.java
new file mode 100644
index 0000000000..6426c3dc69
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/CompareWithEachOtherAction.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.ui.internal.compare;
+
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.ui.compare.CDOCompareEditorUtil;
+
+import org.eclipse.jface.action.IAction;
+
+import java.util.List;
+
+/**
+ * @author Eike Stepper
+ */
+public class CompareWithEachOtherAction extends AbstractAction<CDOCommitInfo>
+{
+ public CompareWithEachOtherAction()
+ {
+ super(CDOCommitInfo.class);
+ }
+
+ @Override
+ protected void run(IAction action, List<CDOCommitInfo> targets)
+ {
+ if (targets.size() == 2)
+ {
+ CDOCommitInfo commitInfo0 = targets.get(0);
+ CDOCommitInfo commitInfo1 = targets.get(1);
+ CDOCompareEditorUtil.openDialog(commitInfo0, commitInfo1);
+ }
+ }
+}

Back to the top