Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-10-23 11:05:43 -0400
committerEike Stepper2010-10-23 11:05:43 -0400
commit3f0cb57fbfc41ff2078da7e16eb9067623d3822d (patch)
treee01623ea40e1861be341f6d34adfe3fe70e892a4 /plugins/org.eclipse.emf.cdo.workspace.efs
parent6a87d48348fbaba6f2448494810362929767982a (diff)
downloadcdo-3f0cb57fbfc41ff2078da7e16eb9067623d3822d.tar.gz
cdo-3f0cb57fbfc41ff2078da7e16eb9067623d3822d.tar.xz
cdo-3f0cb57fbfc41ff2078da7e16eb9067623d3822d.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.efs')
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace.efs/src/org/eclipse/emf/cdo/workspace/internal/efs/CDOResourceNodeStore.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.workspace.efs/src/org/eclipse/emf/cdo/workspace/internal/efs/CDOResourceNodeStore.java b/plugins/org.eclipse.emf.cdo.workspace.efs/src/org/eclipse/emf/cdo/workspace/internal/efs/CDOResourceNodeStore.java
index 1a92fccc56..5696b4b5a6 100644
--- a/plugins/org.eclipse.emf.cdo.workspace.efs/src/org/eclipse/emf/cdo/workspace/internal/efs/CDOResourceNodeStore.java
+++ b/plugins/org.eclipse.emf.cdo.workspace.efs/src/org/eclipse/emf/cdo/workspace/internal/efs/CDOResourceNodeStore.java
@@ -32,7 +32,6 @@ import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-import java.util.concurrent.atomic.AtomicReference;
/**
* @author Eike Stepper
@@ -45,7 +44,7 @@ public final class CDOResourceNodeStore extends AbstractFileStore
private String name;
- private AtomicReference<CDOID> resourceNodeID = new AtomicReference<CDOID>();
+ private CDOID resourceNodeID;
public CDOResourceNodeStore(CDOWorkspaceStore workspaceStore, IFileStore parent, String name)
{
@@ -174,8 +173,18 @@ public final class CDOResourceNodeStore extends AbstractFileStore
try
{
view = workspaceStore.getWorkspace().openView();
- CDOResourceNode node = view.getResourceNode(getPath());
- resourceNodeID.compareAndSet(null, node.cdoID());
+
+ CDOResourceNode node;
+ if (resourceNodeID == null)
+ {
+ node = view.getResourceNode(getPath());
+ resourceNodeID = node.cdoID();
+ }
+ else
+ {
+ node = (CDOResourceNode)view.getObject(resourceNodeID);
+ }
+
return run(node);
}
finally

Back to the top