summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-11-12 05:20:11 (EST)
committerEike Stepper2007-11-12 05:20:11 (EST)
commita9ffe7bc90d2e6eef51aa220024275d8b2c1fee7 (patch)
tree27d0f9bf5c75d9d65f429fb25625ba975e3734e6
parentd1336876753ab1632fecbb728aaae36c39341cb0 (diff)
downloadcdo-a9ffe7bc90d2e6eef51aa220024275d8b2c1fee7.zip
cdo-a9ffe7bc90d2e6eef51aa220024275d8b2c1fee7.tar.gz
cdo-a9ffe7bc90d2e6eef51aa220024275d8b2c1fee7.tar.bz2
[209380] Add invitation capability for multi buddy collaborations
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209380
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/CollaborationsItemProvider.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/MembershipItemProvider.java (renamed from plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/MembershipItemProvider.java)2
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesContentProvider.java41
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesView.java1
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsContentProvider.java41
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsItemProvider.java107
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/SessionManagerView.java1
7 files changed, 6 insertions, 191 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/CollaborationsItemProvider.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/CollaborationsItemProvider.java
index aa0779c..099579a 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/CollaborationsItemProvider.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/CollaborationsItemProvider.java
@@ -10,6 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.buddies.internal.ui;
+import org.eclipse.net4j.buddies.protocol.ICollaboration;
import org.eclipse.net4j.buddies.protocol.IMembership;
import org.eclipse.net4j.internal.buddies.Self;
import org.eclipse.net4j.util.ui.views.IElementFilter;
@@ -101,7 +102,8 @@ public class CollaborationsItemProvider extends AbstractItemProvider
@Override
protected Node addChild(Collection<Node> children, Object element)
{
- return super.addChild(children, ((IMembership)element).getCollaboration());
+ ICollaboration collaboration = ((IMembership)element).getCollaboration();
+ return super.addChild(children, collaboration);
}
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/MembershipItemProvider.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/MembershipItemProvider.java
index 408fa01..a071566 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/MembershipItemProvider.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/MembershipItemProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.buddies.internal.ui.views;
+package org.eclipse.net4j.buddies.internal.ui;
import org.eclipse.net4j.buddies.protocol.IMembership;
import org.eclipse.net4j.util.ui.views.IElementFilter;
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
deleted file mode 100644
index 76b8fd5..0000000
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesContentProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************
- * 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.IBuddyContainer;
-import org.eclipse.net4j.util.ui.StructuredContentProvider;
-
-/**
- * @author Eike Stepper
- */
-public class BuddiesContentProvider extends StructuredContentProvider<IBuddyContainer>
-{
- public BuddiesContentProvider()
- {
- }
-
- public Object[] getElements(Object inputElement)
- {
- return getInput().getElements();
- }
-
- @Override
- protected void connectInput(IBuddyContainer input)
- {
- input.addListener(this);
- }
-
- @Override
- 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/BuddiesView.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesView.java
index 9d1c39f..31e2fed 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesView.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesView.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.buddies.internal.ui.views;
import org.eclipse.net4j.buddies.IBuddyCollaboration;
+import org.eclipse.net4j.buddies.internal.ui.ChatInstaller;
import org.eclipse.net4j.buddies.protocol.IBuddy;
import org.eclipse.net4j.buddies.protocol.IMembership;
import org.eclipse.net4j.util.container.ContainerUtil;
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
deleted file mode 100644
index c31d41a..0000000
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsContentProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************
- * 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);
- }
-}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsItemProvider.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsItemProvider.java
deleted file mode 100644
index 2975e4a..0000000
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsItemProvider.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/***************************************************************************
- * 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.IMembership;
-import org.eclipse.net4j.internal.buddies.Self;
-import org.eclipse.net4j.util.ui.views.IElementFilter;
-
-import org.eclipse.swt.graphics.Image;
-
-import java.util.Collection;
-
-/**
- * @author Eike Stepper
- */
-public class CollaborationsItemProvider extends AbstractItemProvider
-{
- public CollaborationsItemProvider()
- {
- }
-
- public CollaborationsItemProvider(IElementFilter rootElementFilter)
- {
- super(rootElementFilter);
- }
-
- @Override
- protected Node createNode(Node parent, Object element)
- {
- if (element instanceof Self)
- {
- return new SelfNode((Self)element);
- }
-
- if (element instanceof IMembership)
- {
- IMembership membership = (IMembership)element;
- if (membership.getBuddy() instanceof Self)
- {
- return null;
- }
- }
-
- return super.createNode(parent, element);
- }
-
- @Override
- protected Node createMembershipNode(Node parent, IMembership membership)
- {
- return createLeafNode(parent, membership);
- }
-
- @Override
- protected String getText(IMembership membership)
- {
- return getText(membership.getBuddy());
- }
-
- @Override
- protected Image getImage(IMembership membership)
- {
- return getImage(membership.getBuddy());
- }
-
- /**
- * @author Eike Stepper
- */
- private class SelfNode extends AbstractContainerNode
- {
- private Self self;
-
- public SelfNode(Self self)
- {
- super(null);
- this.self = self;
- }
-
- @Override
- public void dispose()
- {
- if (!isDisposed())
- {
- self.removeListener(containerListener);
- super.dispose();
- }
- }
-
- public Self getElement()
- {
- return self;
- }
-
- @Override
- protected Node addChild(Collection<Node> children, Object element)
- {
- return super.addChild(children, ((IMembership)element).getCollaboration());
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/SessionManagerView.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/SessionManagerView.java
index 768994c..ace5354 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/SessionManagerView.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/SessionManagerView.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.buddies.internal.ui.views;
import org.eclipse.net4j.buddies.IBuddySession;
+import org.eclipse.net4j.buddies.internal.ui.BuddiesItemProvider;
import org.eclipse.net4j.buddies.internal.ui.actions.ConnectAction;
import org.eclipse.net4j.buddies.internal.ui.actions.DisconnectAction;
import org.eclipse.net4j.buddies.internal.ui.actions.FlashAction;