Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-10-19 10:03:42 +0000
committerEike Stepper2010-10-19 10:03:42 +0000
commitcd3cf8d6d462c75aedc127c7dc24c0f05be3fe7d (patch)
tree2bb5a24b79ce3dffe38c85874418580fb8cf764c /plugins/org.eclipse.emf.cdo.ui.workspace
parent229a1603ee62c04266c90e50909a04e464fb5bf8 (diff)
downloadcdo-cd3cf8d6d462c75aedc127c7dc24c0f05be3fe7d.tar.gz
cdo-cd3cf8d6d462c75aedc127c7dc24c0f05be3fe7d.tar.xz
cdo-cd3cf8d6d462c75aedc127c7dc24c0f05be3fe7d.zip
[327405] Provide an offline CDOWorkspace with Checkout/Update/Commit workflows
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327405
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui.workspace')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.workspace/plugin.xml8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.workspace/src/org/eclipse/emf/cdo/ui/internal/workspace/CheckoutAsAction.java45
2 files changed, 52 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui.workspace/plugin.xml b/plugins/org.eclipse.emf.cdo.ui.workspace/plugin.xml
index c2c3a0d8de..fb68764478 100644
--- a/plugins/org.eclipse.emf.cdo.ui.workspace/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.ui.workspace/plugin.xml
@@ -19,10 +19,16 @@
id="org.eclipse.emf.cdo.ui.workspace.CheckoutSourceContribution"
objectClass="org.eclipse.emf.cdo.location.ICheckoutSource">
<action
+ class="org.eclipse.emf.cdo.ui.internal.workspace.CheckoutAsAction"
+ enablesFor="1"
+ id="org.eclipse.emf.cdo.ui.workspace.CheckoutAsAction"
+ label="Check Out As...">
+ </action>
+ <action
class="org.eclipse.emf.cdo.ui.internal.workspace.CheckoutAction"
enablesFor="1"
id="org.eclipse.emf.cdo.ui.workspace.CheckoutAction"
- label="Checkout...">
+ label="Check Out">
</action>
</objectContribution>
</extension>
diff --git a/plugins/org.eclipse.emf.cdo.ui.workspace/src/org/eclipse/emf/cdo/ui/internal/workspace/CheckoutAsAction.java b/plugins/org.eclipse.emf.cdo.ui.workspace/src/org/eclipse/emf/cdo/ui/internal/workspace/CheckoutAsAction.java
new file mode 100644
index 0000000000..bfa1f1a1c8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui.workspace/src/org/eclipse/emf/cdo/ui/internal/workspace/CheckoutAsAction.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2004 - 2010 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
+ * Victor Roldan Betancort - maintenance
+ */
+package org.eclipse.emf.cdo.ui.internal.workspace;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * @author Eike Stepper
+ */
+public class CheckoutAsAction implements IObjectActionDelegate
+{
+ private Shell shell;
+
+ public CheckoutAsAction()
+ {
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart)
+ {
+ shell = targetPart.getSite().getShell();
+ }
+
+ public void selectionChanged(IAction action, ISelection selection)
+ {
+ }
+
+ public void run(IAction action)
+ {
+ MessageDialog.openInformation(shell, "CDO Model Repository Client UI Workspace", "Checkout... was executed.");
+ }
+}

Back to the top