summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-16 13:41:24 (EDT)
committerEike Stepper2007-10-16 13:41:24 (EDT)
commit27edab21a9abb87f033c444739338fb0ed3fc0dd (patch)
treef50c3fa4940bbb623c941da692e6446eb1825294
parent30f83c8bd0cc671593422b6cedd1ba20eb510a74 (diff)
downloadcdo-27edab21a9abb87f033c444739338fb0ed3fc0dd.zip
cdo-27edab21a9abb87f033c444739338fb0ed3fc0dd.tar.gz
cdo-27edab21a9abb87f033c444739338fb0ed3fc0dd.tar.bz2
[206224] Provide chat example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=206224
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java10
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java11
2 files changed, 18 insertions, 3 deletions
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java
index 0095953..6d69f5f 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java
@@ -115,10 +115,14 @@ public class ClientSession extends BuddyContainer implements IBuddySession, ILis
public void buddyRemoved(String userID)
{
IBuddy buddy = removeBuddy(userID);
- LifecycleUtil.deactivate(buddy);
- for (ICollaboration collaboration : self.getCollaborations())
+ if (buddy != null)
{
- ((Collaboration)collaboration).removeBuddy(userID);
+ for (ICollaboration collaboration : self.getCollaborations())
+ {
+ ((Collaboration)collaboration).removeBuddy(userID);
+ }
+
+ LifecycleUtil.deactivate(buddy);
}
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
index 6c37cd6..80e17ec 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
@@ -81,4 +81,15 @@ public class Self extends Buddy
// TODO Implement method Self.join()
throw new UnsupportedOperationException("Not yet implemented");
}
+
+ @Override
+ protected void doDeactivate() throws Exception
+ {
+ for (ICollaboration collaboration : getCollaborations())
+ {
+ LifecycleUtil.deactivate(collaboration);
+ }
+
+ super.doDeactivate();
+ }
}