Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-11-10 03:00:58 -0500
committerEike Stepper2012-11-10 03:00:58 -0500
commitb57afa4f490049562df8b03f484841a8d7a19394 (patch)
tree5de71df2cbcffc3d043b0a39e012148c67264ac2
parent52d463835420717cce795c55586aa25075472f76 (diff)
downloadcdo-b57afa4f490049562df8b03f484841a8d7a19394.tar.gz
cdo-b57afa4f490049562df8b03f484841a8d7a19394.tar.xz
cdo-b57afa4f490049562df8b03f484841a8d7a19394.zip
[393911] Create a complete offline and fail-over example suite
https://bugs.eclipse.org/bugs/show_bug.cgi?id=393911
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java2
4 files changed, 6 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java b/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java
index baa8e5063c..bb1a009f08 100644
--- a/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java
+++ b/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java
@@ -84,6 +84,7 @@ public class ClientView extends AbstractView<CDOSession>
treeViewer = new TreeViewer(parent, SWT.BORDER);
treeViewer.setLabelProvider(itemProvider);
treeViewer.setContentProvider(itemProvider);
+ treeViewer.setSorter(itemProvider);
treeViewer.setInput(session);
hookDoubleClick();
diff --git a/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java b/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java
index 702755151f..1e29676312 100644
--- a/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java
+++ b/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java
@@ -30,6 +30,7 @@ import org.eclipse.emf.cdo.server.net4j.FailoverAgent;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.session.CDOSessionConfigurationFactory;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
import org.eclipse.emf.cdo.view.CDOViewTargetChangedEvent;
import org.eclipse.net4j.Net4jUtil;
@@ -635,6 +636,7 @@ public abstract class NodeType extends SetContainer<Node> implements IElement
}
CDOTransaction transaction = session.openTransaction(branch);
+ transaction.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
transaction.addListener(new IListener()
{
public void notifyEvent(IEvent event)
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java
index baa8e5063c..bb1a009f08 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/ClientView.java
@@ -84,6 +84,7 @@ public class ClientView extends AbstractView<CDOSession>
treeViewer = new TreeViewer(parent, SWT.BORDER);
treeViewer.setLabelProvider(itemProvider);
treeViewer.setContentProvider(itemProvider);
+ treeViewer.setSorter(itemProvider);
treeViewer.setInput(session);
hookDoubleClick();
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java
index 702755151f..1e29676312 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/nodes/NodeType.java
@@ -30,6 +30,7 @@ import org.eclipse.emf.cdo.server.net4j.FailoverAgent;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.session.CDOSessionConfigurationFactory;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
import org.eclipse.emf.cdo.view.CDOViewTargetChangedEvent;
import org.eclipse.net4j.Net4jUtil;
@@ -635,6 +636,7 @@ public abstract class NodeType extends SetContainer<Node> implements IElement
}
CDOTransaction transaction = session.openTransaction(branch);
+ transaction.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
transaction.addListener(new IListener()
{
public void notifyEvent(IEvent event)

Back to the top