summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-11 01:55:23 (EDT)
committerEike Stepper2007-10-11 01:55:23 (EDT)
commit6a8d48cce37351bafa3046cc5c7f5593daededa5 (patch)
treeb2bcf7db219aa067b229ee03fe89cbb4183f8c4f
parenta04ebf6f31d67eae793b529ca63e45fd810f93ee (diff)
downloadcdo-6a8d48cce37351bafa3046cc5c7f5593daededa5.zip
cdo-6a8d48cce37351bafa3046cc5c7f5593daededa5.tar.gz
cdo-6a8d48cce37351bafa3046cc5c7f5593daededa5.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesContentProvider.java12
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsContentProvider.java41
2 files changed, 45 insertions, 8 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesContentProvider.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesContentProvider.java
index 9707dc7..76b8fd5 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesContentProvider.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesContentProvider.java
@@ -10,18 +10,14 @@
**************************************************************************/
package org.eclipse.net4j.buddies.internal.ui.views;
-import org.eclipse.net4j.buddies.IBuddySession;
+import org.eclipse.net4j.buddies.protocol.IBuddyContainer;
import org.eclipse.net4j.util.ui.StructuredContentProvider;
-import org.eclipse.internal.net4j.ConnectorFactory;
-
/**
* @author Eike Stepper
*/
-public class BuddiesContentProvider extends StructuredContentProvider<IBuddySession>
+public class BuddiesContentProvider extends StructuredContentProvider<IBuddyContainer>
{
- public static final String PRODUCT_GROUP = ConnectorFactory.PRODUCT_GROUP;
-
public BuddiesContentProvider()
{
}
@@ -32,13 +28,13 @@ public class BuddiesContentProvider extends StructuredContentProvider<IBuddySess
}
@Override
- protected void connectInput(IBuddySession input)
+ protected void connectInput(IBuddyContainer input)
{
input.addListener(this);
}
@Override
- protected void disconnectInput(IBuddySession input)
+ protected void disconnectInput(IBuddyContainer input)
{
input.removeListener(this);
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsContentProvider.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsContentProvider.java
new file mode 100644
index 0000000..c31d41a
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsContentProvider.java
@@ -0,0 +1,41 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
+ * 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
+ **************************************************************************/
+package org.eclipse.net4j.buddies.internal.ui.views;
+
+import org.eclipse.net4j.buddies.protocol.ICollaborationContainer;
+import org.eclipse.net4j.util.ui.StructuredContentProvider;
+
+/**
+ * @author Eike Stepper
+ */
+public class CollaborationsContentProvider extends StructuredContentProvider<ICollaborationContainer>
+{
+ public CollaborationsContentProvider()
+ {
+ }
+
+ public Object[] getElements(Object inputElement)
+ {
+ return getInput().getElements();
+ }
+
+ @Override
+ protected void connectInput(ICollaborationContainer input)
+ {
+ input.addListener(this);
+ }
+
+ @Override
+ protected void disconnectInput(ICollaborationContainer input)
+ {
+ input.removeListener(this);
+ }
+}