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.examples/src
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.examples/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/VariousExamples.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java3
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/VariousExamples.java b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/VariousExamples.java
index ee28c8f019..a0a0604b78 100644
--- a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/VariousExamples.java
+++ b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/VariousExamples.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.net4j.CDOSessionConfiguration;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CommitException;
+import org.eclipse.net4j.Net4jUtil;
import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.util.container.IPluginContainer;
@@ -31,8 +32,7 @@ public class VariousExamples
public static void openSessionAndUseTransaction() throws CommitException
{
ResourceSet resourceSet = new ResourceSetImpl();
- IConnector connector = (IConnector)IPluginContainer.INSTANCE.getElement("org.eclipse.net4j.connectors", "tcp",
- "repos.foo.org:2036");
+ IConnector connector = Net4jUtil.getConnector(IPluginContainer.INSTANCE, "tcp", "repos.foo.org:2036");
CDOSessionConfiguration configuration = CDONet4jUtil.createSessionConfiguration();
configuration.setConnector(connector);
diff --git a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
index 80260fbaa6..1dbfdc1d70 100644
--- a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
+++ b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
@@ -251,8 +251,7 @@ public abstract class FailoverExample
protected IConnector createConnector(String description)
{
- container.removeElement("org.eclipse.net4j.connectors", TRANSPORT_TYPE, description);
- return (IConnector)container.getElement("org.eclipse.net4j.connectors", TRANSPORT_TYPE, description);
+ return Net4jUtil.getConnector(container, TRANSPORT_TYPE, description);
}
protected IRepositorySynchronizer createRepositorySynchronizer(IConnector connector, String repositoryName)

Back to the top