Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-10-17 06:38:20 +0000
committerEike Stepper2010-10-17 06:38:20 +0000
commit2746e5c21da94fed21ab7e2de5a118b736e1e0f1 (patch)
tree21e1c2cdfc40cd911bc23e597e297592636afa20 /plugins/org.eclipse.emf.cdo.workspace
parent1d102f2febbc0f37a8315fb85a95c5321d8ba9d0 (diff)
downloadcdo-2746e5c21da94fed21ab7e2de5a118b736e1e0f1.tar.gz
cdo-2746e5c21da94fed21ab7e2de5a118b736e1e0f1.tar.xz
cdo-2746e5c21da94fed21ab7e2de5a118b736e1e0f1.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.workspace')
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/build.properties3
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/plugin.xml24
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/FolderCDOWorkspaceMemory.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/spi/workspace/InternalCDOWorkspaceMemory.java2
4 files changed, 53 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.workspace/build.properties b/plugins/org.eclipse.emf.cdo.workspace/build.properties
index a3a3d2ff2c..40d2e66960 100644
--- a/plugins/org.eclipse.emf.cdo.workspace/build.properties
+++ b/plugins/org.eclipse.emf.cdo.workspace/build.properties
@@ -5,6 +5,7 @@ bin.includes = META-INF/,\
.options,\
about.html,\
copyright.txt,\
- plugin.properties
+ plugin.properties,\
+ plugin.xml
src.includes = about.html,\
copyright.txt
diff --git a/plugins/org.eclipse.emf.cdo.workspace/plugin.xml b/plugins/org.eclipse.emf.cdo.workspace/plugin.xml
new file mode 100644
index 0000000000..fb167b4f69
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/plugin.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.3"?>
+<!--
+ 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
+-->
+
+<plugin>
+
+ <extension
+ point="org.eclipse.net4j.util.factories">
+ <factory
+ class="org.eclipse.emf.cdo.internal.workspace.FolderCDOWorkspaceMemory$Factory"
+ productGroup="org.eclipse.emf.cdo.workspace.memories"
+ type="folder"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/FolderCDOWorkspaceMemory.java b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/FolderCDOWorkspaceMemory.java
index 5a2b132eff..91c51fd056 100644
--- a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/FolderCDOWorkspaceMemory.java
+++ b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/FolderCDOWorkspaceMemory.java
@@ -16,7 +16,9 @@ import org.eclipse.emf.cdo.common.protocol.CDODataInput;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.spi.workspace.InternalCDOWorkspaceMemory;
+import org.eclipse.net4j.util.factory.ProductCreationException;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import org.eclipse.net4j.util.io.IOUtil;
@@ -193,4 +195,27 @@ public class FolderCDOWorkspaceMemory extends AbstractCDOWorkspaceMemory
}
}
}
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Factory extends org.eclipse.net4j.util.factory.Factory
+ {
+ public static final String TYPE = "folder";
+
+ public Factory()
+ {
+ super(InternalCDOWorkspaceMemory.PRODUCT_GROUP, TYPE);
+ }
+
+ public Factory(String productGroup, String type)
+ {
+ super(productGroup, type);
+ }
+
+ public FolderCDOWorkspaceMemory create(String description) throws ProductCreationException
+ {
+ return new FolderCDOWorkspaceMemory(new File(description));
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/spi/workspace/InternalCDOWorkspaceMemory.java b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/spi/workspace/InternalCDOWorkspaceMemory.java
index add6a62311..6c3c90e52e 100644
--- a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/spi/workspace/InternalCDOWorkspaceMemory.java
+++ b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/spi/workspace/InternalCDOWorkspaceMemory.java
@@ -18,6 +18,8 @@ import org.eclipse.emf.cdo.workspace.CDOWorkspaceMemory;
*/
public interface InternalCDOWorkspaceMemory extends CDOWorkspaceMemory
{
+ public static final String PRODUCT_GROUP = "org.eclipse.emf.cdo.workspace.memories";
+
public InternalCDOWorkspace getWorkspace();
public void init(InternalCDOWorkspace workspace);

Back to the top